Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    foreach (@array) {
            print "Matched :$_:\n" if /$value/;
    }
    
  2. or download this
    Matched :revenuebytrafficker:
    
  3. or download this
    use strict;
    use warnings;
    ...
    
    my @matches = grep {/$value/} @array;
    print ("Matched :" . (join ": :", @matches) . ":\n") if @matches;
    
  4. or download this
    Matched :revenuebytrafficker: :revengebysmoker: