Help for this page

Select Code to Download


  1. or download this
    my @records;
    while (<IN>) {
    ...
        # Stick your variables into an array for later use
        push @records, [ $NUM, $SEC, $LONG, $LAT ];
    }
    
  2. or download this
    # Sort by LONG (index 0=NUM, 1=SEC, 2=LONG, 3=LAT)
    my @sorted_recs = sort { $$records[$a][2] <=> $$records[$b][2] } @reco
    +rds;
    
  3. or download this
    for my $rec (@sorted_recs) {
       # pull the variables from the current record
    ...
    
       print "Num=$NUM, Sec=$SEC, Long=$LONG, Lat=$LAT\n";
    }