good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
my @filtered = ( ... )[ -1 ];
Since the @filtered array cannot be more than a single element, wouldn't it be better to make this a scalar? This would have the possibly desirable side effect that if the input array were empty, $most_recent would be undefined/false. (It must be defined/true otherwise because it would be a reference.) Give a man a fish: <%-{-{-{-< In reply to Re^2: Get most recent data based on a date from an array of hashes.
by AnomalousMonk
|
|