in reply to Re^3: Need Help: Capture Print Outputs from a Function
in thread Need Help: Capture Print Outputs from a Function

wfsp.

Thank you for your patience. Being a beginner, I appreciate yours and everyone else's help and patience.

Anyway, the code is working as a stand alone so I must be introducing something else that it does not like.

My PERL version is listed as 5.008005 in SunOS 5.8.

On the subject of a new scope. Does that mean I should do the following:

sub1() { my $variables; my $buff; code code code { local *STDOUT; open( STDOUT, '>', \$buf ) or die "Write to buffer ailed\n"; mysub(); } print "buffer: $buf\n"; more code } sub mysub { print "mysub output\n"; }
Again, thanks. MNJ