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

Re: [perl #76756] PATCH: srand returns the seed

Thread Previous | Thread Next
From:
Eric Brine
Date:
July 28, 2010 09:27
Subject:
Re: [perl #76756] PATCH: srand returns the seed
Message ID:
AANLkTimnmzZ8D5__Uuyfti6xUPqnB3QfidU-cGsBTuF-@mail.gmail.com
On Wed, Jul 28, 2010 at 11:21 AM, Chas. Owens <chas.owens@gmail.com> wrote:

> Does anybody know
> the full list of strings that are not warned about?


"0 but true" is the only special case (
http://perl5.git.perl.org/perl.git/blob/da1010ecc50c91387eed9bcc349e6960909a3484:/numeric.c#l747),
but there are many ways of writing zero other than "0".
http://www.perlmonks.org/?node_id=464548 has quite a few.

There's been a regression since that node was written. The following used to
be silent.

$ perl -wle'print 0+"0x0"'
Argument "0x0" isn't numeric in addition (+) at -e line 1.
0

- Eric

Thread Previous | Thread Next


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