| | |
Pointers for PERL
![]() |
•
•
Join Date: May 2007
Posts: 81
Reputation:
Solved Threads: 1
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.
In perl you have got reference , it cannot be dangling. The memory management is taken care by the langauge.
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
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
![]() |
Similar Threads
- Change Password In A Shell Script (Shell Scripting)
- Shell Programming (Shell Scripting)
- Programming FAQ - Updated 1/March/2005 (Computer Science)
- to use c++ program from perl (Perl)
- Log file rotation script (Perl)
- Using passwd in a perl file to automate user creation (Perl)
- total newb - "passing arg 2 of `strcpy' makes pointer from integer without a cast" (C++)
- Apache rewrite map (PHP)
- What Language is used in software like Adobe Photoshop? (C++)
Other Threads in the Perl Forum
- Previous Thread: how can i measure these server load with request from my personal
- Next Thread: perl beginner question
| Thread Tools | Search this Thread |






