
February 5th, 2000, 05:42 AM
|
|
Contributing User
|
|
Join Date: Aug 1999
Posts: 119
Time spent in forums: 1 m 41 sec
Reputation Power: 14
|
|
|
This might be what you're looking for:
#!/usr/bin/perl -w
@a1 = ("one", "two", "three");
@a2 = ("ten", "eleven", "twelve");
@a3 = (100, 200, 300);
@r = (@a1, @a2, @a3);
$m = @r; # reference to a reference to a list
print $m->[1][1], "n";
print "n";
for ($i = 0; ; $i++) {
if (defined($m->[$i])) {
for ($j = 0; ; $j++) {
if (defined($m->[$i][$j])) {
print "i$i, j$j: $m->[$i][$j]n";
}
else { last }
}
}else { last }
}
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by miguelgarcia:
Is there a simple way to do this? The stuff I've seen so far seems overly complicated for just sorting.? ? ?
any code samples or directions to good examples would be apprecieated.[/quote]
|