Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Dereference an array reference

by Russ (Deacon)
on Apr 19, 2001 at 01:06 UTC ( [id://73665]=note: print w/replies, xml ) Need Help??


in reply to Dereference an array reference

If $self->things is an array ref, you just need to change your loop:
foreach (@{$self->things}){...}
The @{} will dereference your things array and make $_ be each item. So, if $self->things is an array of names, you will replace XXXXX with $_.

Does this address the problem?

Russ
Brainbench 'Most Valuable Professional' for Perl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found