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

Shlomi Fish shlomif at iglu.org.il
Mon Jan 30 00:26:34 PST 2006

On Sunday 29 January 2006 23:39, Levenglick Dov-RM07994 wrote:
> sub GetOptions {
> 	my @_ARGV = @ARGV;
> 	@ARGV = split /\s+/, shift;
> 	my $rc = &Getopt::Long::GetOptions;
> 	@ARGV = @_ARGV;
> 	return $rc;
> }

Do you intend that inidividual arguments may contain whitespaces? Like:

-m "Hi Dov, this is Shlomi" -t Right\ there

What about backslashes, and other stuff.

I wrote a command line arguments splitter for a subset of the Bourne Shell 
syntax here:


It is written in C, and the code is a bit hideous. You might wish to have 
something similar for your code.


	Shlomi Fish

Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

More information about the Perl mailing list