Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Common Regex Gotchas

by Desdinova (Friar)
on Mar 14, 2001 at 22:41 UTC ( #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
Node Status?
node history
Node Type: note [id://64448]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-02 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (27 votes), past polls