in reply to Re: Re: Parsing command line
in thread Parsing command line
use Getopt::Long; use strict; use warnings; use Data::Dumper; my %hash; GetOptions(\%hash, 'pdcuse!', 'uamlist=s', 'loginmesg=s'); print "" . Dumper(\%hash) . "\n"; __END__ perl test.pl -u "test eins zwei drei" -l "test drei vier fuenf" -p yields: $VAR1 = { 'pdcuse' => 1, 'uamlist' => 'test eins zwei drei', 'loginmesg' => 'test drei vier fuenf' };
using local instead of my doesn't alter the result, it simply works...(older SuSE, bah, perl 5.6.1)
So I'm out of luck here...
regards,
tomte
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Parsing command line
by hotshot (Prior) on Aug 26, 2002 at 13:46 UTC | |
by Tomte (Priest) on Aug 26, 2002 at 13:52 UTC | |
by hotshot (Prior) on Aug 26, 2002 at 14:12 UTC | |
by Tomte (Priest) on Aug 26, 2002 at 15:02 UTC | |
by hotshot (Prior) on Aug 26, 2002 at 15:17 UTC | |
|