awohld has asked for the wisdom of the Perl Monks concerning the following question:
%perl script.pl 7 12 5 or %perl script.pl < text.txt #where the contents of the text file are 7 +12 5
This is an addon to an older semi-related nodeif(@ARGV) { my @node_numbers= @ARGV} else { my @node_numbers = do { local $/; split ' ', <> };} if (!@node_numbers) { print <<"EOF"; ##################################### # # use args or < a text file # ##################################### EOF die; } # Do rest of code after here using @node_numbers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File to take @ARGS or "<" Redirect
by ikegami (Patriarch) on Apr 20, 2005 at 19:41 UTC | |
by awohld (Hermit) on Apr 20, 2005 at 19:48 UTC | |
by tcf03 (Deacon) on Apr 20, 2005 at 19:50 UTC | |
|
Re: File to take @ARGS or "<" Redirect
by Roy Johnson (Monsignor) on Apr 20, 2005 at 19:35 UTC | |
by awohld (Hermit) on Apr 20, 2005 at 19:39 UTC | |
|
Re: File to take @ARGS or "<" Redirect
by tcf03 (Deacon) on Apr 20, 2005 at 19:38 UTC |