Hi, how do I close this bug ? I found out the problem is not Perl, the
problem was I did not carefully read the documentation.
Thuon
On Wed, Mar 30, 2011 at 5:55 PM, Bugs in List-MoreUtils via RT <
bug-List-MoreUtils@rt.cpan.org> wrote:
Show quoted text>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "odd behavior when using @p, @q as instance variables",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your ticket has been
> assigned an ID of [rt.cpan.org #67102]. Your ticket is accessible
> on the web at:
>
>
https://rt.cpan.org/Ticket/Display.html?id=67102
>
> Please include the string:
>
> [rt.cpan.org #67102]
>
> in the subject line of all future correspondence about this issue. To do
> so,
> you may reply to this message.
>
> Thank you,
> bug-List-MoreUtils@rt.cpan.org
>
> -------------------------------------------------------------------------
> use List::MoreUtils qw{ any pairwise };
>
> @a = (100, 243);
> @b = (92, 73);
> @x = pairwise { ($a - $b)**2 } @a, @b;
>
> print "\@a == @a\n";
> print "\@b == @b\n";
> print "\@x == @x\n";
>
> @p = (100, 243);
> @q = (92, 73);
> @y = pairwise { ($p - $q)**2 } @p, @q;
>
> print "\@p == @p\n";
> print "\@q == @q\n";
> print "\@y == @y\n";
>
> yields:
>
> C:\Users\tpc>perl anew.pl
> @a == 100 243
> @b == 92 73
> @x == 64 28900
> @p == 100 243
> @q == 92 73
> @y == 0 0
>
> C:\Users\tpc>
>
>