Help for this page

Select Code to Download


  1. or download this
    #define 3 variables, 2 for storage, one for temp...
    my ($a, $b, $c);
    ...
    $b = $c;
    
    #now, $a has $b and $b has what $a had
    
  2. or download this
    ($b, $a) = ($a, $b);   #swap two variables
    
  3. or download this
    #!/usr/bin/perl -w
    
    ...
    
    not traditional: 11 wallclock secs (10.25 usr +  0.00 sys = 10.25 CPU)
    + @ 302846.15/s (n=3104173)
    traditional: 11 wallclock secs (10.83 usr +  0.00 sys = 10.83 CPU) @ 4
    +91714.04/s (n=5325263)