open (FILE, "<$list") or die "$list failed: $!\n"; chomp(@srvr = <FILE>); #note close (FILE); foreach $ARGV ( @ARGV ) { print "Comparing <$ARGV> to\n"; $exists = grep { print " <$_>\n"; $ARGV eq $_ } @srvr; if (!$exists) { print "Cant do this"; # exit (1); } }
In reply to Re^3: grep exact words
by Roy Johnson
in thread grep exact words
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |