in reply to crypt prototype and ( time ) x 2

Either do what Liz said, or if you really don't want to create extra variables, do something like:
$ perl -wle 'print sub {crypt $_ [0], $_ [0]} -> (time)'

Having said that, one should realize that the output only changes every 100 seconds, as crypt only looks at the first 8 characters, and time returns nowadays a 10 digit number.

Abigail

Replies are listed 'Best First'.
•Re: Re: crypt prototype and ( time ) x 2
by merlyn (Sage) on Oct 08, 2003 at 14:20 UTC
Re: Re: crypt prototype and ( time ) x 2
by DentArthurDent (Monk) on Oct 08, 2003 at 13:01 UTC
    If you wanted to get around the time only changing every 100 seconds problem use:
    $time = time() % 100000000; # time mod a number with 8 zeros
    That will give you a different time-seeded number every second, being the last 8 digits of the time returned by the time function.
    ----
    If I melt dry ice can I swim without getting wet?