![]() |
| ||
| Pointers for PERL In C we have what we call dangling pointers where if a pointer is pointing to something else and if that something else is deallocated or removed from memory then the pointer that is pointing to that something else is now a dangling pointer. I've been learning the basics of perl but never get to touch pointers. Are there possibilities in PERL to have a dangling pointer? or can we even create pointers in PERL? i'm doing console apps and not for the web. |
| ||
| Re: Pointers for PERL In perl you have got reference , it cannot be dangling. The memory management is taken care by the langauge. |
| ||
| Re: Pointers for PERL Yes, with perl this should not be a problem although it does help to properly declare variables within the intended scope of their use using "my", "our", or "local" when and where appropriate. As ithelp has said, in perl they are called references. They are mostly used to create complex data strucutes, like a multi-dimensional array or hash, but can be used for other things. http://perldoc.perl.org/functions/ref.html |
| All times are GMT -4. The time now is 7:22 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC