|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: japhy blabs about regexes (again)by Wookie (Beadle) |
| on Jul 17, 2001 at 12:47 UTC ( [id://97297]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Surely all this depends on how much white space you're typically expecting.
Could the following not also be more efficent depending on the data:
or indeed (thanks to MZSanford for this one): and for trailing - use rindex :). UPDATE: Oops - The index solution only works for *actual* spaces (thanks Hofmator). That possibly gets you a little closer to the best of both worlds? game(Wookie,opponent) eq 'Wookie' ? undef $problem : remove_limbs(arms,opponent);
In Section
Meditations
|
|
||||||||||||||||||||||||||||