in reply to split on spaces, except those within quotes?
No doubt a fancy regex will do the trick, but simpler in my mind would be Text::ParseWords' parse_line()...
my @chunks = parse_line(' ', 0, $line);
One thing to note, however, is parse_line() makes no distinction between single and double quotes, which may or may not work for you.
--k.
|
|---|