in reply to creating 2D arrays

Please read perlreftut, perldsc, perllol, perlref, and (if you'd like) Using Refs.

Your code:

@results[$i][] = mult($a,@b[$i]);
should -- I think -- be written as:
$results[$i] = [ mult($a, @b) ];
or
@{ $results[$i] } = mult($a, @b);
(Using @foo[$i] is generally incorrect.)

_____________________________________________________
Jeff japhy Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;