use List::MoreUtils qw( zip6 ); my @b = map { $_->[0] - $_->[1] } zip6 @{[ @a[0..$#a-1] ]}, @{[ @a[1..$#a] ]}; [download]
:)
In reply to Re^2: Abusing Map by ikegami in thread Abusing Map by writch