Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

TIMTOWTDI and other languages

by Ovid (Cardinal)
on Apr 28, 2002 at 20:35 UTC ( #162711=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    }
    @results = sort { $a <=> $b } @results;
    print "Linear search: @results\n";
    
  2. or download this
    my @alphas = qw/ 9 4 3 2 22  13 7  140 95 278/;
    my @betas  = qw/ 8 3 4 1 278 94 15 7   19 200/;
    ...
    
    @results = sort { $a <=> $b } @results;
    print "Hash lookup:   @results\n";
    
  3. or download this
    my @alphas = qw/ 9 4 3 2 22  13 7  140 95 278/;
    my @betas  = qw/ 8 3 4 1 278 94 15 7   19 200/;
    ...
            return undef;
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://162711]
Approved by robin
Front-paged by robin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-07-22 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (109 votes), past polls