http://qs1969.pair.com?node_id=657923


in reply to How to juggle between two arrays that are not same size

there are probably faster solutions, but if your arrays don't get too large nested loops would be acceptable:
foreach $el (@Fullrecord) { @splitarray=split(/\_/,$el); foreach $nameel (@Names) { push (@DesiredRecord, $nameel) if ($nameel eq $splitarray[0]); } }