develooper Front page | perl.perl5.porters | Postings from February 2000

$hash{v1.2.3.4} does not work

Thread Next
From:
Gisle Aas
Date:
February 18, 2000 15:35
Subject:
$hash{v1.2.3.4} does not work
Message ID:
m33dqqkrte.fsf@eik.g.aas.no
It looks like version tuples are not recognised when used directly as
hash keys in perl5.5.650.

  $ perl -MO=Deparse -e '$hash{v1.2.3.4}++;'
  ++$hash{'v1' . 2.3 . 4};
  -e syntax OK

Also, with perl5.005_03 this is deparsed as:

  $ perl -MO=Deparse -e '$hash{v1.2.3.4}++;'
  -e syntax OK
  ++$hash{'v12.34'};

Is perl5.5.650 less clever with constant folding?
And why did the "-e syntax OK" line come last with perl5.5.650?  Just
a buffering coincidence?

Regards,
Gisle

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