On 2002-03-13 11:39:07 -0500, Etienne wrote: > my $rs_ref = $dbh->selectall_arrayref ("SELECT evtDate, evtID, evtName FROM > events"); > > # now if I want to make the sum of the dates (juste an example) I would do > my $sum = 0; > map { $sum += $_->[0] } @{$rs_ref}; > # ok this was a basic map.. > > But how to sort with a map?
Why do you want to sort with map? Just let the database do the sorting: my $rs_ref = $dbh->selectall_arrayref ("SELECT evtDate, evtID, evtName FROM events ORDER BY evtDate"); hp -- _ | Peter J. Holzer | My definition of a stupid question is |_|_) | Sysadmin WSR / LUGA | "a question that if you're embarassed to | | | [EMAIL PROTECTED] | ask it, you stay stupid." __/ | http://www.hjp.at/ | -- Tim Helck on dbi-users, 2001-07-30
msg09582/pgp00000.pgp
Description: PGP signature