Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: substr complexities

by ikegami (Patriarch)
on Sep 01, 2004 at 19:26 UTC ( #387662=note: print w/replies, xml ) Need Help??

in reply to substr complexities

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)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://387662]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2023-09-30 09:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found