Mailing List Archive

'use integer' problems
Hi All,
did anyone else ever try to use the 'minus bareword' options combined
with 'use integer'?
Please try the following:
use integer;
use strict;

my %a = ( -parm => 'value', -func => 'function');

which on my version of perl5.001m gives (with '-w'):
Argument "parm" isn't numeric for integer negate at a.pl line 4.
Argument "func" isn't numeric for integer negate at a.pl line 4.

Slightly weird, especially with pTk...

Hildo Biersma
Re: 'use integer' problems [ In reply to ]
On Thu, 19 Oct 1995 23:38:05 BST, "H.P.P. Biersma" wrote:
>Please try the following:
>use integer;
>use strict;
>
>my %a = ( -parm => 'value', -func => 'function');
>
>which on my version of perl5.001m gives (with '-w'):
>Argument "parm" isn't numeric for integer negate at a.pl line 4.
>Argument "func" isn't numeric for integer negate at a.pl line 4.
>

This looks like a rather serious bug (happens without 'use strict' too).
The resulting hash has only one entry, since all the keys get
interpreted as 0.

- Sarathy.
gsar@engin.umich.edu