Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 romping around the Monastery: (2)
As of 2023-03-27 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?