Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Dereference an array reference

by Russ (Deacon)
on Apr 19, 2001 at 01:06 UTC ( #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
Node Status?
node history
Node Type: note [id://73665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2021-04-18 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?