in reply to Smart way to deal with cmdline Args?
1. first, you declare the variable 2. then, you pass it as Hash to the function that reads it .. 3. then, again deal with same variable in the usage()... Is there a way I have to deal with the variable just once??Maybe foobar(\my %hash); or foobar(my $href = {...}); can get you part of the way there.
I only glanced at them, but you might make use of Getopt::ArgvFile (specifying files that are automatically read?) or Getopt::Lucid (which talks about reading in config file in its synopsis).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Smart way to deal with cmdline Args?
by shail (Initiate) on Dec 08, 2010 at 17:29 UTC |