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

Re: Assigning AoH pairs by value other AoH's

by nedals (Deacon)
on Sep 10, 2005 at 22:25 UTC ( [id://490947]=note: print w/replies, xml ) Need Help??


in reply to Assigning AoH pairs by value other AoH's

Depending on how you want the data displayed, you might consider using HTML::Templates's LOOP function by changing the gender to 1 and 0 instead of 'M' and 'F'

my $AoH = [ { name => "Bob", gender => 1 }, { name => "Sue", gender => 0 }, { name => "Mike", gender => 1 } ]; $template->param( ARRAY => $AoH, ); .tmpl file... <TMPL_LOOP NAME=ARRAY> <!-- males --> <TMPL_IF NAME="gender"><TMPL_VAR NAME=name> .... <TMPL_ELSE> <!-- females --> <TMPL_VAR NAME=name> <TMLP_IF> </TMPL_LOOP>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-18 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found