in reply to Random String Generator

A slight bit of refactoring:
my @v = my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat) = localtime; printf "Password: %s\n", reverse(substr(crypt(((add()) * $< / $)), rand($$)), 2,9)); sub add { my $v += $_ for @v; }

Replies are listed 'Best First'.
Re: Re: Random String Generator
by nimdokk (Vicar) on Jun 03, 2003 at 20:00 UTC
    maybe its my version of Perl, but I ended up having to run that subroutine as:

    sub add { foreach (<@v>) { my $v += $_; } }

    "Ex libris un peut de tout"

        Ah thank you. I believe that 5.004 is in fact the version running on that box. Unfortunately, I do not control that aspect of the box but when it gets upgraded to the latest OS version, it should be a newer version of Perl. At home, my machines run a newer version.

        "Ex libris un peut de tout"