in reply to Parsing arguments

Unless you really feel the need to write your own patterns, you should check out Text::ParseWords. The quotewords() and shellwords() functions will make life much easier for you.

Replies are listed 'Best First'.
Re: Re: Parsing arguments
by hv (Prior) on Feb 20, 2003 at 19:37 UTC

    Thanks, I'll have to take a closer look at that. At first glance it seems I'll still have to do some parsing on the resulting token stream, and I'm not sure how much cleaner the resulting code would be. In particular, I'd have to keep the delimiters to be able to distinguish between key=value and "not=a key", and then reparse them out again.

    Hugo