Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: I got dem co(smic)|(ma) blues again Momma..

by frankus (Priest)
on Jun 10, 2002 at 13:23 UTC ( #173113=note: print w/ replies, xml ) Need Help??


in reply to Code explanation needed (was: What does this mean)

Line 1:
Collect all the lines that match the regex from the array @file, it's a dumb way of doing it but hey..

Line 2:
Needs a $ at the start, stores the regex in a hash of non_matches unless there are matches in the @matches array.

Line 3:
Again needs a $ at the start. Stores the regex in a hash if there are duplicates.

It could be written nicer.. ;)

--

Brother Frankus.

¤


Comment on Re: I got dem co(smic)|(ma) blues again Momma..
Re: Re: I got dem co(smic)(ma) blues again Momma..
by Joost (Canon) on Jun 10, 2002 at 13:28 UTC
    Line 2 and 3 start with subroutine calls (not hash elements), so they don't need a $ at the start.
    -- Joost downtime n. The period during which a system is error-free and immune from user input.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2015-07-06 10:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (71 votes), past polls