J
jidanni
Gentlemen, no big deal, but in
$ w3m -dump http://en.wikipedia.org/wiki/Talk:The_Hum |grep -A1 perl
$ perl -we 'for(0..33){print int rand 2?"_":"-"}'
_------_-___-_--__-__----____-_-__
how could I make such strings more efficiently, perhaps via
pack(), unpack(), vec(), sprintf "%b", tr/01/_-/, etc.?
I.e., I want to print a line of random _ and -'s. However, being a nerd,
I want to know the most efficient, even though I'm only doing it once in
a lifetime, for that Wikipedia comment, which you are welcome to add to too.
$ w3m -dump http://en.wikipedia.org/wiki/Talk:The_Hum |grep -A1 perl
$ perl -we 'for(0..33){print int rand 2?"_":"-"}'
_------_-___-_--__-__----____-_-__
how could I make such strings more efficiently, perhaps via
pack(), unpack(), vec(), sprintf "%b", tr/01/_-/, etc.?
I.e., I want to print a line of random _ and -'s. However, being a nerd,
I want to know the most efficient, even though I'm only doing it once in
a lifetime, for that Wikipedia comment, which you are welcome to add to too.