in reply to STDERR Restore after redirect
#!/usr/bin/perl use warnings; use strict; open my $fh, '>', '1.log' or die $!; my $stdout = *STDOUT; my $stderr = *STDERR; *STDOUT = $fh; *STDERR = $fh; print "stdout 1\n"; warn "stderr 1\n"; *STDOUT = $stdout; *STDERR = $stderr; print "stdout 2\n"; warn "stderr 2\n";
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: STDERR Restore after redirect
by tultalk (Monk) on Apr 26, 2018 at 22:59 UTC | |
by tultalk (Monk) on Apr 27, 2018 at 00:13 UTC | |
by choroba (Cardinal) on Apr 27, 2018 at 08:36 UTC | |
by poj (Abbot) on Apr 27, 2018 at 19:28 UTC | |
by huck (Prior) on Apr 28, 2018 at 22:45 UTC |