Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: == works where it shouldn't but eq doesn't where it should

by wolv (Pilgrim)
on Jan 16, 2006 at 20:51 UTC ( [id://523597]=note: print w/replies, xml ) Need Help??


in reply to Re: == works where it shouldn't but eq doesn't where it should
in thread == works where it shouldn't but eq doesn't where it should

Which, by the way, is inefficient as it iterates through the whole @ops array even if the first element matches $who! A better approach is first in List::Util.
if (first { $_ eq $who } @ops) { print "matches"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-05-20 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found