On Sun, Oct 12, 2003 at 05:35:21PM +0200, Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Zentara wrote:
> > [EMAIL PROTECTED] (Igor Ryaboy) wrote:
> >
> > foreach (@kiddies){ $_->join(); }
> 
> Printing these out (i.e.):
> foreach (@kiddies){
>     $_->join();
>     print "$_ joined.\n";
> }
> 
> gives me: 
> threads=SCALAR(0x81de948) joined.
> threads=SCALAR(0x81e180c) joined.
> etc.
> 
> But what does that mean in slightly plainer English?

That "package=TYPE(0xaddress)" is how perl stringifies an object
reference.  The objects in @kiddies are SCALAR references blessed
into package "threads".

Plain scalar reference:

  % perl -le 'print \2'
  SCALAR(0x81aa374)

Blessed scalar reference (object):

  % perl -le 'print bless \($x = 2), "threads"'
  threads=SCALAR(0x81aa3bc)

-- 
Steve

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to