Jamison has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); print "Content-type:text/html\n\n"; open(INF,"data.txt") or dienice("Couldn't open survey.out for reading: + $! \n"); @data = <INF>; close(INF); foreach $i (@data) { chomp($i); ($info) = split(/\ /,$i); # Now we can print out a web page summarizing the data. print"<html><head><title>Input from Visitors</title></head>"; print "<body>"; print " Data is: "; print $info; print "<br><hr><br>"; print "</body></html>"; sub dienice { my($msg) = @_; print "<h2>Error</h2>\n"; print $msg; exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove & from file
by graff (Chancellor) on Mar 17, 2004 at 04:11 UTC | |
|
Re: query string from file
by Kozz (Friar) on Mar 17, 2004 at 03:50 UTC |