fuzzy_logic Posted June 23, 2004 Share Posted June 23, 2004 I just started reading about Perl a few days ago. I wrote my first cgi script but it doesn't even compile #!/usr/bin/perl -w use CGI qw(:standard); my $host = param("host"); my $visitor = param("visitor"); my $time = param("time"); open(LOGFILE, ">log"); print LOGFILE ("$host, $visitor, $time"); close(LOGFILE); The error I get is: Use of uninitialized value in concatenation (.) or string at cgi line 8. Can someone tell me what's wrong? Link to comment Share on other sites More sharing options...
0 kibkid Posted June 28, 2004 Share Posted June 28, 2004 >>print LOGFILE ("$host, $visitor, $time"); I don't think you have to put the "$" in those variables here. That might be the problem, i tested it and it worked. Link to comment Share on other sites More sharing options...
Question
fuzzy_logic
I just started reading about Perl a few days ago. I wrote my first cgi script but it doesn't even compile
#!/usr/bin/perl -w use CGI qw(:standard); my $host = param("host"); my $visitor = param("visitor"); my $time = param("time"); open(LOGFILE, ">log"); print LOGFILE ("$host, $visitor, $time"); close(LOGFILE);The error I get is:
Can someone tell me what's wrong?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts