use strict; use warnings; # ---- add this stub to the start of your program ---- use IO::File; use IO::Capture::Stdout; our $capture; BEGIN{ $capture = IO::Capture::Stdout->new(); $capture->start(); } END{ $capture->stop(); my $f = new IO::File "results.txt", "w" or die "Can not create file" +; while (defined ($_ = $capture->read())) { print $f "$_"; print "$_"; } } # ---- your stuff here ---- print "Test Line One\n"; print "Test Line Two\n"; print ""; print "Test Line Three\n";
In reply to Re: Re: Re: Dumping data
by Roger
in thread Dumping data
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |