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 (Canon)
on Dec 20, 2012 at 20:26 UTC ( [id://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'

Replies are listed 'Best First'.
Re^2: How to generate random sequence of UTF-8 characters
by ted.byers (Monk) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1009792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-19 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found