develooper Front page | perl.perl5.porters | Postings from July 2019

[perl #134273] perlvar - recommend numeric comparisons for $]

Thread Previous
Dan Book
July 9, 2019 05:40
[perl #134273] perlvar - recommend numeric comparisons for $]
Message ID:
# New Ticket Created by  Dan Book 
# Please include the string:  [perl #134273]
# in the subject line of all future correspondence about this issue. 
# <URL: >

The $] variable is a numeric version and so numeric comparisons should be
used to avoid weirdness due to trailing zeroes; these comparisons work fine
in most cases, stringifying $] before the comparison fixes issues on old
Perls where its numeric value is calculated differently. The attached patch
will update the documentation for $] to recommend this.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About