On Tue, Dec 17, 2002 at 12:39:41AM -0600, christopher j bottaro wrote:

> cool beans, thanks.  wow, perl is neat, but i fear it will make me a
> bad c programmer...;)

I think Perl actually made me a better C programmer, but it is sometimes
frustrating going down to the level of C.  Keep your hand in with XS
programming :-)

> so i guess there is no concept of stack and heap space when dealing
> with perl?

Not at the lamguage level.

> just that memory will stay allocated as long as there is a way to
> reach it?

Yes.  And occassionally even if there isn't.  Perl 5 uses reference
counting, and so you have to make your own provisions for destroying
circular data structures.

> hehe, i can't wait to abuse that fact....;)

We don't call it abuse.  It's just programming the way you think you
should rather than the way the language thinks you should :-)

> On Tuesday 17 December 2002 12:21 am, John W. Krahn wrote:
> > Christopher J Bottaro wrote:
> > > well when the function goes out of scope,
> > > isn't @array deallocated (popped off the stack) and now that reference
> > > you returned is pointing to garbage?
> >
> > No, as long as there is still a reference to the array the data is
> > available.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

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

Reply via email to