Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: Re: Splitting a hashref into hashrefs

by legLess (Hermit)
on Mar 20, 2003 at 22:43 UTC ( [id://244745]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Splitting a hashref into hashrefs
in thread Splitting a hashref into hashrefs

Thanks for the additional reply, and for being a bit more explicit in your disagreement. We'll have to agree to disagree, I think.

There are many places in the templates where I do have multiple items and do require Template::Toolkit's dot.notation. I think it's better (and easier for the template maintainer) to be consistent by always using hashes than to switch between hashes and scalars.

The point of my post wasn't to argue about my templating (although this is fine, really, and has given me some additional ideas to chew on), but to find a way to make the code do what I wanted. So far no one's touched upon my original question as indicated by my title; I'll try again.
--
man with no legs, inc.
  • Comment on Re: Re: Re: Re: Splitting a hashref into hashrefs

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Splitting a hashref into hashrefs
by perrin (Chancellor) on Mar 20, 2003 at 22:53 UTC
    It looked to me like submersible_toaster answered your question. There is no way to get two hashrefs out of a single DBI query, so you have to divide it up later. Hash slices are the cleanest way to divide up a hash, as he shows in his example. They are the hash version of saying @array[0,1].

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found