|
|
| "be consistent" | |
| PerlMonks |
Re: Splitting multiple commands with regex failureby moritz (Cardinal) |
| on Aug 24, 2012 at 07:48 UTC ( #989444=note: print w/ replies, xml ) | Need Help?? |
|
For splitting the commands, you can split before a ! sign
Then if you want to ignore all but the first command, just use $commands[0] This leaves trailing spaces in the commands. If you want to remove those too, split on /\s*(?=!)/ instead.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||