in reply to array matching problems

There is more than one way to do it...

use strict; use warnings; my @numbers = ('1','1','1','2','2','3','3','4','4','5','6'); my @strings = ('hello','you','tree','people','fun','sun', 'grass','love','food','car','rabbit'); my %cats; # This solution will gobble @strings. foreach ( @numbers ) { $cats{$_} .= shift( @strings ); } print "$cats{$_}\n" foreach sort keys %cats;

Dave