in reply to pairwise() doesn't seem to work...
You need to import pairwise from List::MoreUtils. It seems that Perl interprets pairwise { ($a, $b) } as indirect object notation otherwise:
use List::MoreUtils qw( pairwise );
In Section
Seekers of Perl Wisdom