On Fri, 22 Feb 2002 11:51:59 -0800, [EMAIL PROTECTED] (Sir Douglas
Cook) wrote:

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

The problem seems to be in your "here" document,
where you try to expand a variable. There is a faq item
for this.
Just slurp the whole file right into $cardbody.

#!/usr/bin/perl

$FILE_NAME = './z99';
&create_file;

sub create_file
{
&make_body;
open(OUTFILE,">$FILE_NAME") ;
print OUTFILE "$cardbody\n";
close (OUTFILE);
}

sub make_body
{
open TEXT, "message.txt";
while (<TEXT>) {
$cardbody .= "$_<BR>";
}
close TEXT;
}





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to