in reply to Re^2: Perl output on console as well as on text file
in thread Perl output on console as well as on text file
I don't have only single print statment. i have big perl script in which i am using so many perl commands as well as no. of print statements. i want whole output to be printed on console as well as on text file.also i don't want to install any other module fom CPAN. is still any way to get out of this problm
Its called a subroutine, instead of
you writeprint $fh $str; ... print $fh $str; ... print $fh $str;
where DoublePrint prints to STDOUT and something elseDoublePrint( $fh, $fh2, $str ); ... DoublePrint( $fh, $fh2, $str ); ... DoublePrint( $fh, $fh2, $str );
|
|---|