Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
capture output from print command to variable in perl
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Anno Siegel, post: 4787871"] AtExit appears to be an interesting module, thanks for mentioning it. However, I don't see the advantage in using it here. It only hides the re-selection of the original output handle. This seems to do the same thing without the obfuscation: my $capture; { open my $capture_handle, '>', \$capture or die $!; my $saved_handle = select $capture_handle; subroutine_i_cannot_alter(); select $saved_handle; } Anno [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
capture output from print command to variable in perl
Top