sub dev_ino_of_handle { join " ", (stat shift)[0, 1] } sub send_maybe_both { my $text = shift; print STDOUT $text; print STDERR $text unless dev_ino_of_handle(\*STDOUT) eq dev_ino_of_ +handle(\*STDERR); } ... send_maybe_both("HEY!\n");
In reply to Re: if (STDERR == STDOUT)
by merlyn
in thread if (STDERR == STDOUT)
by freja
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |