http://qs1969.pair.com?node_id=759770


in reply to Problem with accessing hash Module::CoreList::version with $]

Apparently, this special variable is only a string in perl 5.10, even though the documentation seems to suggest that it be a floating point number. If you use $]+0 in your example, it'll work (which is kind of strange because ordinary hash keys are converted to strings anyway, but in this case I think we are dealing with a tied hash).

% perl5.8.8 -we 'use Devel::Peek; Dump $]' SV = PVNV(0x9f664d0) at 0x9f63ed0 REFCNT = 1 FLAGS = (NOK,POK,READONLY,pNOK,pPOK) IV = 0 NV = 5.008008 # <-- in 5.8 it was a number PV = 0x9f7d250 "5.008008"\0 CUR = 8 LEN = 12 % perl5.10.0 -we 'use Devel::Peek; Dump $]' SV = PV(0x9457198) at 0x946a610 REFCNT = 1 FLAGS = (POK,READONLY,pPOK) PV = 0x945e538 "5.010000"\0 CUR = 8 LEN = 12