gasho has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, I have two arrays different sizes but potentialy same elements. I would like to extract from Bigger array only elements common, please see my code and pseudo code bellow, Thanks
@Names=qw(A B C); @FullRecord=qw(A_1 D_4 C_3 F_6 B_2); foreach $el (@FullRecord) { @SplitArray=split(/\_/,$el); #Pseudo code #if @SplitArray[0] found in @Names then push $el into @DesiredRecord #Result is DesiredRecod =qw(A_1 C_3 B_2);
(: Life is short enjoy it :)