in reply to Re^2: Shell to Perl conversion
in thread Shell to Perl conversion

but things are not working is not an error description.

If you want that script to print out HTML, you have to actually do it. HTML starts with

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Your Title here</title> </head> <body>

So printing something like this might be a good start. As a CGI script you also have to print HTTP headers before any HTML.

Things like open can go wrong, so you should catch errors like this:

open(...) or die "Can't open stuff: $!";