http://qs321.pair.com?node_id=233023

ibanix has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I've got the need to generate a psuedo-random 8-character string. This is what I coded up:
my $string; for (0..7) { $string .= chr( int(rand(25) + 65) ); } print "$string\n";
This works, but I suspect it isn't the best way to do it. As you can tell, it only returns uppercase letters ("A" .. "Z"). Is there a better way to go about this?

Many thanks,
ibanix

$ echo '$0 & $0 &' > foo; chmod a+x foo; foo;