Perl script to generate a Magic Square