Sunday, January 2, 2011

Formating array file output using perl

#!/usr/bin/perl
my @num = (1..14);
for my $i (0 .. $#num) {
    printf ("%-8d", $num[$i]);
    print "\n" if (($i + 1) % 6 == 0);
}

No comments: