Am Dienstag, 10. Juli 2001 21:27 schrieb Erik W:
> --- "Stephen P. Potter" <[EMAIL PROTECTED]>
>
> wrote:
> > 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))
>
> Thanks a lot, then what << means?
> $$<<15 ???
>
from perlbook.pdf: (pg.166)

Shift Operators
Binary "<<" returns the value of its left argument shifted left by the number 
of bits specified by the right
argument. Arguments should be integers. (See also Integer Arithmetic.)


> perl is really unreadable!
>
> > 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/
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/

Reply via email to