what is the shortest way?
I don't know about shortest. Don't feel like playing golf today, sorry :)
Your arrays need better names. So does my %foo.# untested my %foo = map { split /,/, $_, 2 } @arr2; my @arr3 = map { exists $foo{$_} ? $foo{$_} : () } @arr1;
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
In reply to Re: stripping an array
by Juerd
in thread stripping an array
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |