I'm slightly confused by your goal? I assume that this is intended to be used inside a loop with $_ as the loop var, so when I saw Enlil's conclusions that m// is messing with $_ I thought why not avoid m// and use index and came up with this.
if( 1+index($test,substr($test,0,$_)) ){ # Do stuff }
looked like it would do the same test as your 2 steps, but then I realised that what this translates to is
if( $test contains a substring of $test )...
which by definition, will always be true!
Did I miss something?
Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.
In reply to Re: Troubles with m!(??{substr(...)})!
by BrowserUk
in thread Troubles with m!(??{substr(...)})!
by jens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |