You can reset STDOUT in BEGIN block, Please refere follwoing code snippet, it might be helpful you.
BEGIN { open STDERR, '> log.txt' or die "Can't Write to log.txt. Permission Denied!!!"; binmode STDERR; } &pager(); sub pager { my $temp = "temp.txt"; my $pager = "less"; system("$pager $temp"); }
In reply to Re: Some system command not working as required after File::Tee
by tofanikanudo
in thread Some system command not working as required after File::Tee
by perlyogi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |