Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Custom-length random/unique string generator

by Athanasius (Canon)
on Feb 02, 2013 at 17:43 UTC ( #1016730=note: print w/ replies, xml ) Need Help??

in reply to Custom-length random/unique string generator

A minor point:

From the Camel Book (4th Edition, 2012, page 695), under the heading “Time Efficiency”:

  • If you’re deleting characters, tr/abc//d is faster than s/[abc]//g.

So, if speed is a limiting factor, consider replacing:

# Strip out "+" and "/" $buildID =~ s/\+//g; $buildID =~ s/\///g;


$buildID =~ tr{+/}{}d;

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Comment on Re: Custom-length random/unique string generator
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2015-11-27 23:08 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (734 votes), past polls