How can I run a Perl Script on my browser?
Reading I found that I have to do only 2 things:
1) Add a first line to my script (whereis perl):
#! /usr/bin/perl
2) and formatting the output in html-style:
print Content-type: text/html;
print html;
...
etc.
But I dont get the results in the browser.
I
It is supose this code prints the first line of file text.txt (which is
not empty), but it doesn't print anything.
$file = text.txt;
open (file);
file;
print;
close (file);
I understood that file; gets a line (the first in this case) and, in
this case, it puts the line in $_ . Also, print;