[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] YAGOLF: password generation



On Wed, Apr 11, 2001 at 10:07:28AM -0300, Filipe Brandenburger wrote:
> The one I've got is 60 chars:
>     echo|perl -pe "@a=(A..Z,a..z,0..9);eval's##\$a[rand@a]#;'x8"

A case of being too clever for your own good. This is also 60 chars,
and doesn't use an external process. :)
perl -e '@a=(A..Z,a..z,0..9);$x.=$a[rand@a]for 0..8;print$x'

Of course, then there's *really* clever:
perl -e 'print substr crypt(rand,$$),2,8'

-- 
<Addi> Just imagine we are meeting the aliens for the first time.
<ton> Most people would just shoot them to see how many points they are
worth.

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe