in reply to reading files in @ARGV doesn't return expected output
My mind is very much elsewhere at the moment but if nobody else has the time to review and answer in the next bit I'll revisit. That said, why are you using @ARGV like that? This special variable is an array that contains values sent in on the command line; eg:
if (! @ARGV){ die "need an argument..."; } my $username = $ARGV[1];
etc. Then, your command line command:
perl script.pl STEVIEB
Use a lexical array instead. Using @ARGV the way you are is kind of a head-scratcher when initially glancing at the code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reading files in @ARGV doesn't return expected output
by Anonymous Monk on Jun 26, 2017 at 23:50 UTC | |
by stevieb (Canon) on Jun 26, 2017 at 23:53 UTC |