in reply to How to get file path into hash data structure.
BTW:
this makes no sense. @ARGV is a Perl defined array. It contains the command line arguments. This is not a thing for you to define as a "my" variable.my @ARGV ="C:/Main/work"; die "Need directories\n" unless @ARGV;
my $default_dir = "C:/Main/work"; if (@ARGV == 1) { $default_dir = shift @ARGV ) elsif (@ARGV >1) { die "too many command line args\n"; }; # $default_dir remains in effect if there was not # exactly one command line argument
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to get file path into hash data structure.
by veerubiji (Sexton) on Dec 14, 2011 at 17:15 UTC | |
by Marshall (Canon) on Dec 14, 2011 at 19:01 UTC |