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

I updated my node to point out that perl 5.8 is required for that to work (apologies for the delay).

Which version of perl are you using?

  • Comment on Re^3: Need Help: Capture Print Outputs from a Function

Replies are listed 'Best First'.
Re^4: Need Help: Capture Print Outputs from a Function
by mnj200g (Novice) on May 02, 2006 at 18:58 UTC
    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