in reply to RE: General quesion
in thread General quesion

This line:
$pass .= $array[int(rand(scalar(@array)))];
during a code review would have me scratching my head, pondering whether the author was getting paid by the character. I'd probably gently suggest, in the nicest but firmest tones, that it be replace with the much simpler and exactly effectively equivalent:
$pass .= $array[rand @array];

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: RE: General quesion
by lindex (Friar) on Aug 08, 2000 at 16:53 UTC
    Well ok maybe I never tested all the ways to get a rand
    element out of a list :\
    I was just throwing in my two cents.
    Why the way I did it? Because it made since to me the first
    I ever tried todo such a thing :)



    lindex
    /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/