Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: substr complexities

by Not_a_Number (Prior)
on Sep 01, 2004 at 18:59 UTC ( [id://387650]=note: print w/replies, xml ) Need Help??


in reply to substr complexities

My crystal ball is playing up as well, but consider this extract from perldoc perlre (my emphasis):

The numbered variables ($1, $2, $3, etc.) ... are all dynamically scoped until the end of the enclosing block or until the next successful match, whichever comes first.

So it might be that your $1 is getting clobbered by the success of the following regexes. Try changing the order of your if() to the following (some punctuation removed):

if ( /t_9840_acs_0/ && ! /\*Orig/ && /\((E\d+)/ ) { print "$1\n"; }

dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found