TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Perl question
I'm using this code fragment I stole from on the the O'Reilley Perl books:
@chars = ("A" .. "Z", 0 .. 9);
$test= join("", @chars[ map {rand @chars} (1 .. 9) ]);
It gives me 9-character "random" strings, nice as you please. The weird
thing is that they all start with "A". What's up with that?
So far I've only run it on an NT system, on the MS v5.001 Perl port (my test
server).
I'm in the process of setting up a Linux-based Apache server (can't wait) -
will it behave differently there?
Phil Plumbo
Printware