Help for this page

Select Code to Download


  1. or download this
    E:\Perl\site\lib\My>type Filter.pm
    #! perl -slw
    ...
    
    print '=' x 20, 'Timing of regexs in ', $0, '=' x 20;
    print My::Filter::report();
    
  2. or download this
    E:\Perl\site\lib\My>perl Filter.pm
    Subroutine report redefined at E:/Perl/site/lib/My/Filter.pm line 16.
    ...
    5000 trials of (\G(?:.{3})+?)(?<=...)(.)(.)
     (640.000ms total), 128us/trial
    
  3. or download this
    C:\test>perl -MMy::Filter -e"$s='abc'; print 'ok' if $s =~ m[b]; print
    + My::Filter::report();"
    ok1 trial of b
     (0s total)
    
    C:\test>