in reply to Create html file from script

Most errors mentioned above could be avoided, if you
  1. used warnings and strict (use warnings warns about "print on closed filehandle")
  2. used templates or at least here-documents
  3. output the HTML code to STDOUT (it makes debugging from a terminal much easier, and you can always redirect the output to chosen file))
Look at the following snippet:
use warnings; use strict; print "Content-Type: text/html\n\n"; #remove if you print to file print <<HTML; <html> <head> <title>Created By Perl</title> </head> <body> HTML __END__
Modifying your code to look like it can be a good first step :)

     s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print