Look into truth tables, and test -t STDIN first
$ perl -le " warn 0 + @ARGV; warn 0 + -t STDIN" 0 at -e line 1. 1 at -e line 1. $ perl -le " warn 0 + @ARGV; warn 0 + -t STDIN" a b c d e f 6 at -e line 1. 1 at -e line 1. $ perl -le " warn 0 + @ARGV; warn 0 + -t STDIN" a b c d < NUL 4 at -e line 1. 0 at -e line 1. $ perl -le " warn 0 + @ARGV; warn 0 + -t STDIN" < NUL 0 at -e line 1. 0 at -e line 1.
In reply to Re: Using PIped-in and invocation arguments in same script
by Anonymous Monk
in thread Using PIped-in and invocation arguments in same script
by justkar4u
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |