Yimin Rong wrote:
wget -q -O - "http://random.org/integers/?
num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new" | perl -ne
'foreach (split(/\t/, $_)) {print chr(hex($_));} print "\n"'

You can simplify the perl part to:

perl -lane'print map chr hex, @F'


Or just using perl:

perl -MLWP::Simple -le'print map chr hex, split " ", get "http://random.org/integers/?num=8&min=33&max=126&col=8&base=16&format=plain&rnd=new";'


And if you're not connected to the Net:

perl -le'@chars = 33 .. 126; print map chr $chars[ rand @chars ], 1 .. 8'



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to