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

Re: Common Regex Gotchas

by Desdinova (Friar)
on Mar 14, 2001 at 22:41 UTC ( [id://64448]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/local/bin/perl -w
    use strict;
    ...
    );
    
    exit;
    
  2. or download this
    Benchmark: timing 500000 iterations of Method One UC, Method Three s, 
    +Method Two TR...
    Method One UC:  1 wallclock secs ( 1.42 usr +  0.00 sys =  1.42 CPU) @
    + 352112.68/s (n=500000)
    Method Three s: 16 wallclock secs (17.03 usr +  0.00 sys = 17.03 CPU) 
    +@ 29359.95/s (n=500000)
    Method Two TR:  1 wallclock secs ( 2.04 usr +  0.00 sys =  2.04 CPU) @
    + 245098.04/s (n=500000)
    
  3. or download this
     my $data = 'for-bar-baz';
       $data =~ s/-/_/g;
    ...
     my $data = 'for-bar-baz';
     $data =~tr/-/_/;
     print $data;
    
  4. or download this
    Benchmark: timing 500000 iterations of Method One TR, Method Two s...
    Method One TR:  2 wallclock secs ( 1.87 usr +  0.00 sys =  1.87 CPU) @
    + 267379.68/s (n=500000)
    Method Two s:  5 wallclock secs ( 4.84 usr +  0.00 sys =  4.84 CPU) @ 
    +103305.79/s (n=500000)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://64448]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found