I have this perl code written using Notepad which works fine using Apache but when i try to run the perl script on a Linix browser i get a program/script failure error.
Can someone please help me understand why this error is occuring
Thank You
Can someone please help me understand why this error is occuring
Code:
#!/usr/bin/perl
$filename = "ROOMS2.txt";
open(FILE, "$filename") || die("Unable to open $filename: $!\n");
@theRest = <FILE>;
close(FILE);
print "content-type: text/html\n\n";
print"@theRest";
print "<table border='1'>";
foreach $line (@theRest) {
($loc,$size,$code)=split(/\|/,$line);
print "<tr><td>$loc</td><td>$size</td><td>$code</td></tr>";
}
print"</table>";
Comment