in reply to Differentiating STDIN from arguments when using -n ?
(untested)echo stuff | perl -ne 'BEGIN{ $x=shift @ARGV; } print "x=$x\n"' myarg
Is this like what you had in mind?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Differentiating STDIN from arguments when using -n ?
by johngg (Canon) on Sep 15, 2007 at 11:44 UTC | |
by bart (Canon) on Sep 15, 2007 at 11:53 UTC | |
|
Re^2: Differentiating STDIN from arguments when using -n ?
by rduke15 (Beadle) on Sep 15, 2007 at 12:28 UTC | |
by jwkrahn (Abbot) on Sep 15, 2007 at 19:50 UTC | |
by rduke15 (Beadle) on Sep 16, 2007 at 07:57 UTC |