Hello,
The simplest way to do this is to first find the max length of the
numbers:
my @ar1 = qw/116 44 45 49 71/;
my @ar2 = qw/1 1 3 5 1/;
my $max = length ((sort {$b <=> $a} (@ar1,@ar2))[0]); # assuming all
Lightning flashed, thunder crashed and Liger-dc <[EMAIL PROTECTED]> whispered:
| I have a formatting question:
| I have 2 arrays with integers that I want to print, with one array above the
> other so that the
| matching entries end up in the same column. Currently they look like..
|
| 116 44 45
How about this? (using printf)
#!\Perl\bin\perl
#I have a formatting question:
#I have 2 arrays with integers that I want to print, with one array above
the other so that the
#matching entries end up in the same column. Currently they look like..
#
@ar1 = qw(116 44 45 49 71);
@ar2 = qw(1 1 3 5 1)