Now I need to find out with the help of grep if the array
[snip]
I am actually looking for the above queries solution in single statement.
A few considerations:
To illustrate the last point, the following does use grep and is a single statement:
print "ok\n" if 2 == grep sub { my $x=shift; $_ eq $x and return 1 for @arr1; 0; }->($_), qw/Sun Moon/;
In reply to Re: using grep to match more than two words
by blazar
in thread using grep to match more than two words
by sroy5
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |