Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What you have there will work but I would not use map to iterate over a list with only one element like that. It's confusing (another programmer coming to this code will likely struggle to understand why it has been done this way) and probably inefficient. FWIW, these days we have Time::Piece in core so if you want to do this sort of date decomposition in 2022 that's what I would use and recommend:
This also helps save you from bugs if/when getting the maths wrong or using the wrong positions in the source array. 🦛 In reply to Re^2: array assignment
by hippo
|
|