Subject: | List::Util::pairmap() usage producing 'once' warnings for $a and $b |
If you run the attached script you'll get:
Name "main::a" used only once: possible typo at /home/tor/tmp/test.pl line 8.
Name "main::b" used only once: possible typo at /home/tor/tmp/test.pl line 8.
Possible solution to this problem is to access caller's $a and $b during import like List::Pairwise is doing.
Subject: | test.pl |
#! /usr/bin/perl
use strict;
use warnings;
use List::Util qw(pairmap);
pairmap { $a = $b } 1 .. 10;