#!/usr/bin/perl -w # # quick test to match an item in an array use strict; my $match = shift ; my @arr = qw( 2 3 4 5 6 7 foo foo12 12foo 1foo1) ; print "match \n" if ( grep(/\b$match\b/, @arr) ) ;
In reply to Grep ?..
by yodabjorn
in thread Is list member
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |