#!/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; } }
In reply to Remove & from file by Jamison
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |