Hello there,
To make the introduction short, I have a database and I'm fetching infos for
events for a particular month.
So when I fetch I get, per line, the date (only the day of the month), the
eventID (unique) and the name of the event.
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? {$a <=> $b} I'd like all the events by date so
when I loop into my months date, if the current day is like the evtDate I
print the info.. Then flush that line so I always have only to check for the
first line of my data matrix..
I'll stop there with the questions, even if I know that I'll need more help
with this part soon..
Thanks a lot
Etienne