in reply to what does rand[] return?
Well if you do ;
you will see that perl treats the reference to the anonymous array [10] as a number . So what you do is like :print 0 + [10] ;
rand number
In my case this number is 27783332 and the array reference is 0x1a7f0a4 ( that you can see by doing print [10]) which is 27783332 in hex ...
If i repeat execution i get the same reference over and over again for this anon array. I don't know why but that's another problem ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: what does rand[] return?
by Happy-the-monk (Canon) on Nov 30, 2005 at 11:53 UTC | |
|
Re^2: what does rand[] return?
by Errto (Vicar) on Nov 30, 2005 at 16:27 UTC |