Lightning flashed, thunder crashed and Erik W <[EMAIL PROTECTED]> whispered:
| time() ^ $$
| 
| What ^ and $$ mean here?
| 
| ^   bit xor?
| $$  logic and?

$$ is a special variable that is the process ID of the currently running
process.  So, this is returning the bitwise xor of the return of time
(seconds since epoch) and the process ID (generally something between 2 and
65536).  Since perl 5.004 or so, this has been mostly unnecessary.  Even if
it was still necessary, it would probably be better to use something like

time() ^ ($$ + ($$ << 15))

which at least gives two numbers of roughly the same magnitude.

-spp
--
Stephen P Potter                                        [EMAIL PROTECTED]
"You can't just magically invoke Larry and expect that to prove your point.
Or prove that you have a point."        -Simon Cozens
http://www.unixlabs.net/~spp/

Reply via email to