Re: print statement creates key in hash with reference to empty array??
- From: Uri Guttman <uri@xxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 13:48:17 -0500
>>>>> "r" == rhorizon74 <rhorizon74@xxxxxxxxx> writes:
r> Thanks for the help.
r> That explains what is happening (i had used the exists approach to work
r> around).
r> But it does seem bogus that for a simple print statement i need to
r> check each and every level. I havent seen too many languages do
r> something like this (i may be wrong).
r> But a print statement shouldnt really be creating any data.
if you read my article (which sinan posted the url for) then you will
learn more about autoviv and why it is like it is. and even calling
exists will do the same thing (but that is being fixed in perl6). the
win of autovivication is much greater then the loss of rare code like
yours. if you didn't have it you would need to check each time you used a
reference in structure and either assign a new one or use the existing
one. that is massively ugly and clumsy (and i have seen newbies coding
like that all the time).
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
.
- Follow-Ups:
- References:
- print statement creates key in hash with reference to empty array??
- From: rhorizon74
- Re: print statement creates key in hash with reference to empty array??
- From: it_says_BALLS_on_your forehead
- Re: print statement creates key in hash with reference to empty array??
- From: rhorizon74
- print statement creates key in hash with reference to empty array??
- Prev by Date: Re: Why does Net::SFTP trigger my die handler when no errors?
- Next by Date: Re: print statement creates key in hash with reference to empty array??
- Previous by thread: Re: print statement creates key in hash with reference to empty array??
- Next by thread: Re: print statement creates key in hash with reference to empty array??
- Index(es):