"David Efflandt" <efflandt@xnet.com> wrote in message <SNIP
> Try printing out $ARGV[0] once and see what it contains (might not be what
> you think it is). If you want to use the query string for something, you
> generally need to parse (and convert any special characters) from
> $ENV{QUERY_STRING} (or set a variable name in query string and use CGI
> module).
I had noticed that when I enter addresses with ~'s in them, a \ is placed
before it. However, in the URL I ran that test with
(
http://www.netkee.com), I just tried outputting ARGV[0] and it looked
exactly like I entered it.
>
> It also may be enlightening printing actual content returned by the
> head() or get(), at least for testing. You are just printing a line count
> for head and nothing useful for get.
>
Someone else suggested this and gave me a test program to run. As you can
see though, it ran into some troubles:
_____________________
"Cat" <cat@no-spam.com> wrote in message
news:3EF980B2.6861621D@no-spam.com...
<SNIP>
> Hi, I'd like to know what is actually in @headinfo. Can you
> run the following and tell us what you get for both boxes
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use LWP::Simple;
>
> my @headinfo = head($ARGV[0]);
>
> print scalar(@headinfo) . " items in header\n";
> foreach my $item (@headinfo) {
> print "> $item\n";
> }
No problem, here's the results:
Redhat 7.3 box: When I first ran it I got ": bad interpreter: No such file
or directory". I added a '-w' on the sh-bang line and it run, outputting '0
items in header'.
Mandrake 9.1 box: I got the same 'bad interpreter' error. I added '-w' and
it ran with the following output:
5 items in header
> text/html
Use of uninitialized value in concatenation (.) or string at
../ngtest.cgi line 10.
>.
Use of uninitialized value in concatenation (.) or string at
../ngtest.cgi line 10.
>.
Use of uninitialized value in concatenation (.) or string at
../ngtest.cgi line 10.
>.
Use of uninitialized value in concatenation (.) or string at
../ngtest.cgi line 10.
>.
_________________
Hope this helps. Thanks for the reply.
Mitchua