Is there not a way to redirect STDOUT to BOTH a file and STDOUT at the same time?
Usse IO::Tee
use IO::Tee; open (my $fh, ">","/cache/some/file.html") or errout(); # Note, don't use || here my $tee = IO::Tee->new(\*STDOUT,$fh); print $tee "content"; $tee->flush(); close $fh or errout();
In reply to Re: cat "file" functionality within Perl
by tirwhan
in thread cat "file" functionality within Perl
by Unix_Usr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |