Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Pointer to a structure in Perl

by Loops (Curate)
on Apr 01, 2013 at 07:46 UTC ( [id://1026434]=note: print w/replies, xml ) Need Help??


in reply to Pointer to a structure in Perl

Sounds like you're looking for Perl references. Check out the perlref and perlreftut pages using the perldoc command. As a quick example:
my @array = qw( hello world ); my $array_ref = \@array; print $array[0], "\n"; # prints hello print $array_ref->[0], "\n"; # prints hello

Replies are listed 'Best First'.
Re^2: Pointer to a structure in Perl
by AnomalousMonk (Archbishop) on Apr 01, 2013 at 21:50 UTC

    ... and then check out perldsc and perllol to get the structure part.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-24 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found