Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: (Mis)Understanding <c>grep...eq $_<c>

by ikegami (Patriarch)
on Feb 24, 2009 at 06:45 UTC ( #745912=note: print w/replies, xml ) Need Help??


in reply to (Mis)Understanding grep...eq $_

I thought I understood grep $person_has eq $_, $item {...} to mean:

That's not valid Perl.

search $person_has for

grep $person_has eq $_, $item searches through the list after the comma ($item), not through $person_has. The first expression tells us what is being sought: elements equal to $person_has.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-01-16 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?