Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Select quuery result sets

by codeacrobat (Chaplain)
on Aug 23, 2010 at 09:46 UTC ( #856666=note: print w/ replies, xml ) Need Help??


in reply to Select quuery result sets

Use a hashslice when you need the values in proper order.

my @keys=qw(e1 e2 e3 e4); ... my $result_href = $sth->fetchrow_hashref ... my @values = @{$result_href}{@keys};
If you just want to dump the hash have it sorted, try Data::Dump. Data::Dumper also produces sorted output, when $Data::Dumper::Sortkeys=1; is set.

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});


Comment on Re: Select quuery result sets
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2015-07-07 01:34 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 (86 votes), past polls