Well, gnarly is a pretty subjective term .. you might save some typing by...
my (%org, %group); @org{qw/id name/} = @hashref{qw/org_id org_name/}; @group{qw/id name/} = @hashref{qw/group_id group_name/}; slashDisplay( 'group_edit', { org => \%org , group => \%group });
You might extend that further and replace those {qw/in name/} parts with a predefined array like...
Which may or may not present you with greater gnarlyness. I can see the advantages of filling those two temporary hashes together, rather than in the call to slashDisplay()@slash_org_fields=qw/id name/; @db_org_fields=qw/org_id org_name/; # Then just use them in place @org{@slash_org_fields} = @hashref{@db_org_fields};
If I missed the point I apologise - there's a war on you know
In reply to Re: Splitting a hashref into hashrefs
by submersible_toaster
in thread Splitting a hashref into hashrefs
by legLess
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |