How can I make the "Open File and print content statements" work from my sub make_body
when called from sub create_file?

The output I get is
========================================
open message.txt; while () { = "." } print 
========================================

The contents of message.txt is
========================================
Hello this is a message
========================================

The output I want is
========================================
Hello this is a message
========================================


The problem is how do I get this to work 
========================================
sub make_body
{
$cardbody =<<__END_OF_CARD_BODY__;

    open TEXT, "message.txt";
    while (<TEXT>) {
          print "$_<BR>";
    }
    close TEXT;


__END_OF_CARD_BODY__
}
========================================

The way I print the make_body function
========================================
#Write out our HTML FILE
sub create_file
{
  open(OUTFILE,">$FILE_NAME") ;
  print OUTFILE "$cardbody\n";
  close (OUTFILE);
}
========================================

Reply via email to