Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        substr:  2 wallclock secs ( 2.26 usr +  0.00 sys =  2.26 CPU)
        unpack:  4 wallclock secs ( 3.90 usr +  0.00 sys =  3.90 CPU)
    unpack
    
  2. or download this
    sub prematch {
        unpack sprintf("a%d",$-[0]), $_[0];
    ...
    sub match {
        unpack sprintf ("x%d a%d", $-[0], $+[0] - $-[0] ), $_[0];
    }