Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This is really nifty. Paladin++
I have to spell this out; perhaps other monks will appreciate the explination. Please feel free to correct me. rand @chars takes @chars in scalar context, that is, the length of the array holding our characterset. So rand returns a value somewhere in the array, and that becomes the index for the array lookup. I keep forgetting you can do cool things like this by implied scalar or array context. Thanks, ibanix $ echo '$0 & $0 &' > foo; chmod a+x foo; foo; In reply to Re: Re: Random string generator
by ibanix
|
|