Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: substr complexities

by ikegami (Patriarch)
on Sep 01, 2004 at 17:54 UTC ( #387619=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)

Please submit a snippet of code we can execute and displays the error.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2023-09-27 05:45 GMT
Find Nodes?
    Voting Booth?

    No recent polls found