develooper Front page | perl.perl5.porters | Postings from December 2017

[perl #132645] Array names starting with 'Inf' can be poorlybehaved.

Thread Previous
From:
karl williamson
Date:
December 22, 2017 17:42
Subject:
[perl #132645] Array names starting with 'Inf' can be poorlybehaved.
Message ID:
rt-4.0.24-26861-1513964516-888.132645-75-0@perl.org
# New Ticket Created by  karl williamson 
# Please include the string:  [perl #132645]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132645 >


I am posting this for Dan Book, who is having trouble getting email to 
perlbug through.

The build options and version of perl is immaterial here, except since 5.22.

When the warning "Scalar value @arrayname[0] better written as 
$arrayname[0]"
is triggered (any time an array slice is used with only one element), 
this results
in an error if the array's name starts with 'inf'. Code to reproduce:

use warnings;
my @infasdf;
my @x = @infasdf[0];
1

Error from above code (since 5.22): Cannot printf Inf with 'c' at (IRC) 
line 3.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About