Fox has asked for the wisdom of the Perl Monks concerning the following question:
try remove strict to see the output.use strict; use warnings; my (@s,@m); $s[0] = "123456789"; $s[1] = "987654321"; $s[2] = "123456789"; $s[3] = "987654321"; $s[4] = "123456789"; $s[5] = "987654321"; $s[6] = "123456789"; $s[7] = "987654321"; $s[8] = "123456789"; push @{$m[$_]}, split //,$s[$_] for(0..$#s); # make the matrix my(@f1,@f2,@f3); @f1 = ($m[0],$m[1],$m[2]); # divide @f2 = ($m[3],$m[4],$m[5]); # into groups @f3 = ($m[6],$m[7],$m[8]); # to print format = +-----------------------+ | @ @ @ | @ @ @ | @ @ @ |~~ @{shift @f1} |-------+-------+-------| | @ @ @ | @ @ @ | @ @ @ |~~ @{shift @f2} |-------+-------+-------| | @ @ @ | @ @ @ | @ @ @ |~~ @{shift @f3} +-----------------------+ . write;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: format issues
by shmem (Chancellor) on Dec 04, 2009 at 14:39 UTC | |
by Fox (Pilgrim) on Dec 04, 2009 at 16:07 UTC | |
by shmem (Chancellor) on Dec 04, 2009 at 17:41 UTC | |
|
Re: format issues
by toolic (Bishop) on Dec 04, 2009 at 15:23 UTC | |
|
Re: format issues
by biohisham (Priest) on Dec 04, 2009 at 15:03 UTC |