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

Re: substr complexities

by ikegami (Patriarch)
on Sep 01, 2004 at 19:26 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-24 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found