This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for -$str_with_cached_num
authorFather Chrysostomos <sprout@cpan.org>
Fri, 8 Jun 2012 06:44:10 +0000 (23:44 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 8 Jun 2012 06:51:14 +0000 (23:51 -0700)
pod/perldelta.pod

index 1e7b26c..d90b2b8 100644 (file)
@@ -498,6 +498,12 @@ Numeric operators on magical variables (e.g., S<C<$1 + 1>>) used to use
 floating point operations even where integer operations were more appropriate, resulting in loss of accuracy on 64-bit platforms
 [perl #109542].
 
+=item *
+
+Unary negation no longer treats a string as a number if the string happened
+to be used as a number some time.  So, if $x contains the string "dogs",
+C<-$x> returns "-dogs" even if C<$y=0+$x> has happened at some point.
+
 =back
 
 =head1 Known Problems