in reply to RE(7): Parsing command line
in thread Parsing command line

I do overwrite @ARGV, I guess I missed that in my 'cut & paste':
@ARGV = split(' ', $input);
I have this row just before the call to parseCmdLine().

Hotshot

Replies are listed 'Best First'.
Re: Re: RE(7): Parsing command line
by Tomte (Priest) on Aug 26, 2002 at 16:21 UTC

    The error is, that, unlike the shell, you pass

    @ARGV is (-s, "test, drei, vier")
    for $input="-s \"test drei vier\"" (try Getopt::Long::Configure('debug');)

    I can't come up with an easy way (like one regex) to solve this, you have to parse $input a bit more complicated than the split to mimik the bash-behavior


    regards,
    tomte