Hi all,
I'm not sure if this is possible, but imagine I've got a line as follows:

command arg1 arg2 arg3 arg4 ...

I would like to capture all args with a single regexp, possibly with a
named capture, but I don't know exactly how to do:

my $re = qr/command\s+(?<arg>\w+)+/;

the above of course is going to capture only the first one (one shoot)
or the last one within a loop.
How can I extract the whole array of arguments?

Please note, a raw solution is to remove the command and split, but
I'm asking for a more elegant solution.

Thanks,
Luca

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to