Huh???@arr2 =('a', 'b'); @arr1 = ('a'); for $var1 (@arr2) { if( grep($var1, @arr1) ) { print "match $var1\n"; } } output: match a match b
surely only the 'a' should match?
Cheers
Chris
In reply to Weird grep behaviour by chrism01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |