push(@ARGV, glob("/home/dir/myinput/*"));
You get the added bonus of being able to run the script with -d (and other switches) for debugging without having to recode that bit. The filenames just get added onto the end.
| [reply] [d/l] |
If you are talking Perl's debugger, then changing @ARGV won't have any effect on the -d switch that enables this. @ARGV is the arguments passed to the Perl script and doesn't include (nor modify) the switches and arguments passed to the perl executable (such as -w, -d, or which script to run).
-
tye
(but my friends call me "Tye")
| [reply] |
The point was that pushing (as opposed to assigning) into @ARGV doesn't interfere with any argument processing -- yours (Getopt) or Perl's (-laneipdw0...). Whatever you push will just get processed at the end of whatever you typed which is what he wanted...
| [reply] |