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 ( #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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2022-05-21 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?