Help for this page

Select Code to Download


  1. or download this
     
    my @list_match;
    my @matchArray;
    ...
     print "Found $arrList[2]", if (grep {$_ eq $arrList[2]} @list_match) 
    +## assuming it is a character
    }
    close(INPUT);
    
  2. or download this
    for (my $i = 0; $i <= 10; $i++){
     print "Found $arrList[$i]" if (grep {$_ eq $arrList[$i]} @list_match)
    + 
    ## assuming that @arrList is an array of column 3 elements 
    }
    
  3. or download this
    grep {/$arrList[2]/} @list_match ## if I am searching for $arrList[2]