hi ken --?? ? check out the section on 'Version Strings' in perldata.?? also -- hash keys are evaluated as expressions and are not subject to string interpolation (unless the expression happens to?contain an interpolable string!).?? ? br -- bill??
-----Original Message----- From: Ken Cornetet <ken.corne...@kimball.com> To: activeperl <activeperl@listserv.activestate.com> Sent: Thu, Mar 31, 2011 11:05 am Subject: Parsing/interpolation question I ran into an issue creating hashes with IP addresses as a key. They don't do what you'd expect them to do (at least not what I expected). In other words, $hash{192.168.1.1} isn't the same as $hash{'192.168.1.1'} I understand what's between the "{" and "}" is subject to interpolation, but I don't understand what perl interpolation rules apply. What I found is that something like 192.168.1.1 seems to parsed/interpolated as chr(192) . chr(168) . chr(1) . chr(1) I would have expected that if any interpolation were to be done on 192.168.1.1 the periods would be parsed as a string append giving the result "19216811", which coincidently, is how $x = 192 . 168 . 1 . 1 is parsed. Is there any documentation of this behavior? _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs