1. perl -e 'print "\n", "There is no a in Perl \n" x10, "\n";' > I have a brilliant idea and I know exactly how I want to do it 2. Have you checked CPAN to see if somebody else has already had the same idea? There are a number of modules for matrix operations in there.