Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Re: problems with tr///;

by cforde (Monk)
on Sep 26, 2001 at 22:45 UTC ( [id://114905]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Benchmark;
    
    ...
    
    print "tr: ";
    timethis(100000, '$var =~ tr/\\\//d');
    
  2. or download this
    s:  timethis 100000:  1 wallclock secs ( 0.51 usr +  0.00 sys =  0.51 
    +CPU) @ 195694.72/s (n=100000)
    tr: timethis 100000:  2 wallclock secs ( 1.68 usr +  0.00 sys =  1.68 
    +CPU) @ 59453.03/s (n=100000)
    
  3. or download this
    $var =~ tr /ab/cd/;
    # and
    $var =~ s /ab/cd/g;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found