Help for this page

Select Code to Download


  1. or download this
    while(<INFILE>){
       chomp;
       ($index,@record)=split/[:,]/;
       push @{$records{$index}},@record;
    }
    
  2. or download this
    for $index (sort{$a<=>$b}(keys (%records))){
            print $OUTFILE "$index: ",join(",",(sort{$a<=>$b}(@{$records{$
    +index}}))),"\n";
    }
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
            print $OUTFILE "$index: ",join(",",(sort{$a<=>$b}(@{$records{$
    +index}}))),"\n";
    }
    close $OUTFILE