in reply to How can I print out part of the matrix
#!/usr/bin/perl -w use strict; my @aoa = get_data; foreach my $row(@aoa) { print "$row->[$_] " for (1, 2, 3, 5, 9, 10, 38, 126); print "\n"; }
If you don't know what columns you need to print ahead of time, build an array of the indices you need and use
print "$row->[$_] " for @indices;
-Mike
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How can I print out part of the matrix
by Abigail-II (Bishop) on Jun 03, 2002 at 10:47 UTC |