Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Passing array of references to Template

by philipbailey (Chaplain)
on Aug 23, 2011 at 20:06 UTC ( #921990=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Passing array of references to Template
in thread Passing array of references to Template

FOR and FOREACH are completely interchangeable. I prefer the former, but either is fine.

I would suggest that you convince us (or yourself, at least) that $results contains what you expect, e.g. using Data::Dumper.

Update: it occurs to me that @sendoff is never defined. Did you really run this using strict? You don't seem to need $sendoff or @sendoff at all: just write

$template->param('results' => $results);


Comment on Re^3: Passing array of references to Template
Select or Download Code
Re^4: Passing array of references to Template
by packetstormer (Monk) on Aug 23, 2011 at 20:27 UTC
    Yeah - printing the \@sendoff via Dumper displays what I need. I actually have a typo in what I posted, the actual code is
    my $results = &return_values; my @sendoff = @$results;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2015-07-06 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls