I couldn't come up with anything shorter than muba. I tried, but you need at least one temp var (afaict), or else the $_ will confuse iteslf.
my @a = qw( a b c ); my @b = qw( a 3 c ); for my $elem (@a){ print $elem if grep { $elem eq $_ } @b; }
In reply to Re: Default variable within loops
by stevieb
in thread Default variable within loops
by oldwarrior32
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |