Apple Grape Banana 5 2 3/4 10/15 3 4 for: my @ID = qw(Apple Apple Grape Banana Banana); my @Values = ([qw(5 5 2 3 4 )], [qw(10 15 3 4 4 )], );