Zio has asked for the wisdom of the Perl Monks concerning the following question:
...it does the job. But it isn't smart enough to prompt me if I forget to pipe a file into it. I'd really like some suggestions about how to check if piped data is waiting from STDIN so that I can prompt when it hasn't been called properly.while (<STDIN>) { chomp; print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need help working with STDIN
by jdporter (Paladin) on Feb 04, 2003 at 17:32 UTC | |
|
Re: Need help working with STDIN
by pfaut (Priest) on Feb 04, 2003 at 17:39 UTC | |
|
Re: Need help working with STDIN
by Zio (Novice) on Feb 04, 2003 at 18:11 UTC | |
|
Re: Need help working with STDIN
by hardburn (Abbot) on Feb 04, 2003 at 17:29 UTC | |
|
Re: Need help working with STDIN
by Anonymous Monk on Feb 05, 2003 at 04:07 UTC |