Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 contemplating the Monastery: (6)
As of 2014-07-13 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (248 votes), past polls