Help for this page

Select Code to Download


  1. or download this
    foreach ( CMP <INPUT> ){                                          
           print $_; 
    ...
            my($b0) = $b -> [2];                      
            $b0 <=> $a0
    }
    
  2. or download this
    while (<INPUT>){
         split ( $ip, $num1, $num2);
         printf "%18s %10s %10s\n", $ip, $num1, $num2 ;
    }
    
  3. or download this
    @sorted = map { $a->[2] cmp $b->[2]
        || $a->[2] <=> $b->[2]
        chomp; [split]
        <INPUT>}