>>>>> "Randal" == Randal L Schwartz <[EMAIL PROTECTED]> writes:

Randal> my @elements;
Randal> push @elements, $1 while
Randal>   /\G\s*"((?:[^\\"]|\\"|\\\\)*)"/gc or
Randal>   /\G\s*'((?:[^\\']|\\'|\\\\)*)'/gc or
Randal>   /\G\s*([^\s'"]\S*)/gc;

Randal> Leaving undefined something like \X as malformed. :)

Which can be tested with

        die unless /\G\z/g;

:-)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to