in reply to for loop help

It looks like you need a Hash of Arrays, something like:
my %hash = ( a => [ 0, 1, 4 ], b => [ 8, 2, 9 ], c => [ 1, 4, 7 ], ); for my $i ( 0 .. 2 ) { print "$hash{a}[$i]$hash{b}[$i]$hash{c}[$i]"; }