Help for this page

Select Code to Download


  1. or download this
    if( grep { $scalar == $_ } @array ) {
       print "$scalar is member of @array\n";
    } else {
       print "$scalar is not member of @array\n";
    }
    
  2. or download this
    $scalar = 3;
    @array  = ([1, 2], [3, 4, 5], [6, 7, 8 ,9]);
    ...
    } else {
       print "No\n"
    }