in reply to Re: golfing on localtime
in thread golfing on localtime

As long as you only have adjustments of numbers, I'd go for List::MoreUtils' zip function:

my @adjustments = ( +1900, +1, 0, 0, 0, 0, ); my @t = pairwise { $a+$b } @adjustments, @{[localtime]};

If the operation differs between the elements of the target list/array, I guess a multi-map / MapCar is what you'll need:

my @adjustments = ( sub { $_[0] + 1900 }, sub { $_[0] + 1 }, sub { $_[0] + 0 }, ... ); my @t = pairwise { $a->($b) } @adjustments, @{[localtime]};