What do you mean by not work? Have you tried running the script from the command line to see the errors.
Also note that and " marks in the HTML will have to be escaped using \ unless you want to use ' marks.
Hope this helps:)
Alternatively try a small script to test the principle :
#! /usr/bin/perl
print FILE "blah blah blah \n
more stuff here
and more <br>
etc..";
A tip, if you use ' marks you dont have to escape things - i.e
print FILE 'blah blah blah \n
more stuff here
and "blah"@@@ <br>
etc..';
will work fine.