J
joel
For any number of rows and columns of a multidimensional array, I would
like my printHandler subroutine to print in table format with minimal
effort. What is the easiest way of doing this?
{
...
...
while (my (@array)=($sth->fetchrow_array()))
{
push(@result,[@array]);
}
&printHandler(@result);
}
sub printHandler
{
my $i=0;
foreach (@_)
{
print "@{$_[$i]}\n";
$i++;
}
}
current output:
4591 05-00371
149817 06-02930
15541 06-0369
827 04-00307
13406 06-01364
desired output:
4591 05-00371
149817 06-02930
15541 06-0369
827 04-00307
13406 06-01364
like my printHandler subroutine to print in table format with minimal
effort. What is the easiest way of doing this?
{
...
...
while (my (@array)=($sth->fetchrow_array()))
{
push(@result,[@array]);
}
&printHandler(@result);
}
sub printHandler
{
my $i=0;
foreach (@_)
{
print "@{$_[$i]}\n";
$i++;
}
}
current output:
4591 05-00371
149817 06-02930
15541 06-0369
827 04-00307
13406 06-01364
desired output:
4591 05-00371
149817 06-02930
15541 06-0369
827 04-00307
13406 06-01364