in reply to Case-insensitive, dash-optional named parameters for your functions
use Getopt::Long; sub restart_server { my( $host, $port, $timeout ); local @ARGV = @_; GetOptions( 'host=s' => \$host, 'port=i' => \$port, 'timeout=i' => \$timeout, ); # ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Case-insensitive, dash-optional named parameters for your functions
by William G. Davis (Friar) on Nov 08, 2004 at 08:57 UTC | |
by ikegami (Patriarch) on Nov 09, 2004 at 15:06 UTC | |
by William G. Davis (Friar) on Nov 11, 2004 at 22:37 UTC |