Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: boolean IN(); function in perl like

by adamk (Chaplain)
on Jan 17, 2005 at 03:50 UTC ( [id://422655] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( any { $_ eq $foo } @list ) {
    
    }
    
  2. or download this
    if ( first { ! defined $_ } @list ) {
        # Does not get called if it matches
    ...
    if ( any { ! defined $_ } @list ) {
        # Does get called it if matches
    }