[Israel.pm] new module for CPAN: Getopt::Long::String

Gabor Szabo szabgab at gmail.com
Sun Jan 29 13:57:45 PST 2006


On 1/29/06, Levenglick Dov-RM07994 <Dov at freescale.com> wrote:
> use Getopt::Long::String;
>
> my $string = '-opt1 val1 -opt2 val2 -flag3';
> $result = GetOptions ($string, ...option-descriptions...);

would not this code with the standar Getopt::Long do the same ?


use Getop::Long;
my $string = '-opt1 val1 -opt2 val2 -flag3';

{
     local @ARGV = split / /, $string;
     $result = GetOptions (...option-descriptions...);
}


Gabor




More information about the Perl mailing list