$sbox[$i][$j] = $input[$y] #### use Data::Dumper; Dumper( \@array );