#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 1999
    Location
    DeKalb, IL 60115
    Posts
    7
    Rep Power
    0
    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.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 1999
    Posts
    119
    Rep Power
    15
    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]


IMN logo majestic logo threadwatch logo seochat tools logo