Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Custom-length random/unique string generator

by Athanasius (Chancellor)
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;

with:

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

Hope that helps,

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016730]
help
Chatterbox?
Corion idly wonders about creating a series of HTTP requests. There seems to be no framework to generate a series of HTTP requests, like "try all these requests"
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-01-16 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.