in reply to How do I Determine if my script is being piped to?
#!/usr/bin/perl use POSIX qw(isatty); if (isatty(STDIN)) { die("nope. not like that\n"); } while (<>) { print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I Determine if my script is being piped to?
by netguy (Novice) on Nov 21, 2013 at 00:42 UTC | |
|
Re^2: How do I Determine if my script is being piped to?
by boftx (Deacon) on Nov 21, 2013 at 00:16 UTC |