Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

do Perl supoort the use of memory address and pointers

by creativecoder (Initiate)
on Apr 23, 2013 at 11:18 UTC ( [id://1030107]=perlquestion: print w/replies, xml ) Need Help??

creativecoder has asked for the wisdom of the Perl Monks concerning the following question:

i want to know if Perl support the use of pointers and memory address like in C and C++
  • Comment on do Perl supoort the use of memory address and pointers

Replies are listed 'Best First'.
Re: do Perl supoort the use of memory address and pointers
by sundialsvc4 (Abbot) on Apr 23, 2013 at 11:31 UTC

    Well, there’s Pointer ...

    Like most postmodern languages, Perl has the concept of references (see perlreftut), which are similar to pointers in that they “refer to” other things, but different in that (a) they know what sort of thing they are referring to, and (b) every thing always knows how many references to it currently exist.   Furthermore, memory objects are automatically “garbage collected.”   You don’t have to free them explicitly.

      Also of interest: Devel::PeekPoke which (quite shockingly) has a pure-Perl implementation.

      package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: do Perl supoort the use of memory address and pointers
by Rahul6990 (Beadle) on Apr 23, 2013 at 11:54 UTC
Re: do Perl supoort the use of memory address and pointers
by Discipulus (Canon) on Apr 24, 2013 at 07:21 UTC
    short answer: no.

    L*
    there are no rules, there are no thumbs..

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1030107]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found