Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to generate random sequence of UTF-8 characters

by tobyink (Abbot)
on Dec 20, 2012 at 20:26 UTC ( #1009792=note: print w/ replies, xml ) Need Help??


in reply to How to generate random sequence of UTF-8 characters

Here's a string containing every Unicode word character (i.e. alphanumeric plus underscore) in a random order.

use List::Util 'shuffle'; my $all = join q[], grep /^\w$/, map chr, shuffle 0 .. 0x10FFFF;

Now split that up into parts of whatever length you like!

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: How to generate random sequence of UTF-8 characters
Download Code
Re^2: How to generate random sequence of UTF-8 characters
by ted.byers (Scribe) on Dec 20, 2012 at 20:44 UTC

    Thanks. I will experiment with that.

    Thanks

    Ted

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-11-23 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (129 votes), past polls