Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: testing more than one item for equality

by blazar (Canon)
on Oct 18, 2006 at 13:09 UTC ( [id://579063]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( scalar (grep { $_ eq $item3 } @list) == scalar @list) {
        print "All are equal.\n";
    }
    
  2. or download this
    if (grep { $_ eq $item3 } @list == @list) {
        print "All are equal.\n";
    }
    
  3. or download this
    if (grep $_ neq $item3, $item1, $item2) {
        print "All are equal.\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://579063]
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: (7)
As of 2024-04-19 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found