![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: substr complexitiesby ikegami (Patriarch) |
on Sep 01, 2004 at 19:26 UTC ( #387662=note: print w/replies, xml ) | Need Help?? |
hum, I don't see how this snippet can possibly print what you say it does, or anything at all, for that matter. For starters, E0+ is much shorter than 34 chars long, so the only print that isn't commented won't get executed because the if will fail (unless $_ is 32 chars long and ends with 'E0+'). And then, there's the issue that you are printing $1, yet the last regexp you execute (m/st_9840_acs_0/) doesn't have any captures. btw, I think you're using java-style substring arguments. perl uses substr(string, start, length), not substr(string, start, end)
In Section
Seekers of Perl Wisdom
|
|