Fulep David wrote:
> Thank you all for the answers, here you can see the first lines of the
> program code:
>
> #!/usr/bin/perl -w
> ## Program Name: fetch.cgi
> use CGI;
> use CGI::Carp (fatalsToBrowser);
> use LWP::Simple;
> $xx = new CGI;
>
> print $xx->header;
> $ker = $xx->param(q);
Try putting quotes around the q - ie:
$ker = $xx->param('q');
> $url = "http://www.whatever.com/$ker";
>
> if (!defined $page=get $url) { die "There was an error getting URL: $url\n"; }
I also recomend disambiguating your if clause:
if (!defined($page=get($url))) { die "...."; }
>
> In the line beginning with $ker, q is coming from the HTML form:
> <input type=text name=q>
>
> Something is possibly wrong with this line, if I remove it, the error
> message disappears (... and of course, the program does not work...)
>
> David