Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^6: Accessing this array ref.

by Cristoforo (Deacon)
on Apr 03, 2013 at 22:45 UTC ( #1026910=note: print w/ replies, xml ) Need Help??

in reply to Re^5: Accessing this array ref.
in thread Accessing this array ref.

That was my post above and it occurred to me that you probably want $results as a string to be printed in a web page. If so, I might suggest something like this.

my $results = "Results: "; my $type; for my $entry (@$VAR1) { if ( $entry->{type} ne $type ) { $type = $entry->{type}; $results .= "$type<br />"; } $results .= "&nbsp;&nbsp;&nbsp;$entry->{name} - $entry->{refer +ence}<br />"; }

Update: Now that I've thought about it, it seems you are using HTML::Template or something like it to display your data. And I'm not familiar with that but you probably do want to pass it a structure and not a string.

Comment on Re^6: Accessing this array ref.
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2015-11-27 05:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (719 votes), past polls