in reply to print or die
Update: Revised so as to print to a file and then flush the output buffer.use strict; # Tested on NT 4 Workstation, ActiveState 5.6.1 open (MYFILE, ">tempo4.txt") || die "Unable to open tempo4.txt"; my $myHereDoc =<<UNTIL_I_SAY_STOP; blah, blah, blah UNTIL_I_SAY_STOP if (print MYFILE $myHereDoc) { close MYFILE || die "unable to flush or close file"; } else { die "unable to print to file"; }
|
|---|