-----BEGIN PGP SIGNED MESSAGE-----

Moin,

Michael G Schwern <[EMAIL PROTECTED]> wrote:

>On Fri, Jul 29, 2005 at 08:36:10AM +0200, Piotr Fusik wrote:
>> 2. [#36675] Strings starting with '-' or '+' are treaded as strings, 
>even when they represent numbers. Now I doubt this should be changed, 
>but at least it should be clearly documented in perlop and probably 
>perltrap. (imagine someone extracts numbers with a regular expression or 
>split, and expects "-100" to be treated the same way as "100")
>
>I guess the upshot of this is:
>
>$ perl -wle '$f = "-100";  print -$f'
>+100
>$ perl -wle '$f = -100;  print -$f'
>100

The first one looks wrong to me:

 # perl -wle '$f = "-fo";  print -$f'
 +fo
 # perl -wle '$f = "-NaN";  print -$f'
 +NaN

Ugh. You learn to find some dusted, obscure Perl corner every day...

Best wishes,

Tels

- -- 
Michael G Schwern     [EMAIL PROTECTED]     http://www.pobox.com/~schwern
Just call me 'Moron Sugar'.
        http://www.somethingpositive.net/sp05182002.shtml


- -- 
 Signed on Fri Jul 29 12:44:42 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 Ich bin mit der Gesamtsituation unzufrieden!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQuoJHXcLPEOTuEwVAQEZ0gf+MXC+1uRx17o9qQV3vHB/OK/MfCLxuKLf
sBXMvHvc5GDHGzDhM296rdCX82fY0i8eOJgQo0YKfFTAjZLZOkUxEOc2fHdyr3Kh
ZZ3Zxt/GMkcR/fpTzlUemPk2PZELUE3Pb+pUieTvDzmS0hGrqvelyDwurUSTL9fK
obCsedolBvjur85tjeS4MWWOQ+xbgWWBF/TOupYVIasue7jjMXxKX+yaYjcIxzlA
llFUWqH2M21iz6IFi0adL9gWekgVgG54n+r2+Us1NXvZVpypHixSN/0SmoC+5ACL
M0ZnC71HQsnVZUEQOwrktUQxy1oWUYUW2nFxlrHW0pKvjGChHvo/Wg==
=WUUr
-----END PGP SIGNATURE-----

Reply via email to