Here another option using smart matching:
use Modern::Perl; my @a = 1 .. 10; my @b = 5 .. 14; say grep $_ ~~ @b, @a;
Output:
5678910Hope this helps!
In reply to Re: Default variable within loops
by Kenosis
in thread Default variable within loops
by oldwarrior32
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |