Re: print statement creates key in hash with reference to empty array??
- From: Uri Guttman <uri@xxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 16:59:32 -0500
>>>>> "r" == rhorizon74 <rhorizon74@xxxxxxxxx> writes:
r> The are a bunch of scenarios where a different module is supposed to
r> build a hash, and my module needs to print the values. In which case
r> for each level of nesting of a hash i will be forced to check if the
r> node exists (starting with the outer hash and going onto the inner
r> hash). With my limited exposure to perl i guess it seemed a bit
r> diffcult to grasp.
why are you printing lower levels and not the upper ones? try using
data::dumper instead of rolling your own tree dumper.
r> I did check with a lot of colleagues some who were not exactly novices
r> like me with way much more experience in perl and they too had come
r> across this scenario (they grappled with this by adding checks for each
r> level before printing the values) , but to be honest none with any
r> exact knowlege of vivication. So it did seem like this problem was
r> commonly faced by a lot of programmers.
it seems you still haven't read my article. have you? it has a sub which
will do what you want so you don't have to reinvent it. i suggest you
read it and also tell your colleagues to read it.
r> Thanks for the reply
no thanks for the top post with full quote of my email. have you read
the group guidelines which are posted regularly?
<snip of my entire quoted post>
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
.
- 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
- Re: print statement creates key in hash with reference to empty array??
- From: Uri Guttman
- 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: Transform hash key?
- 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):
Relevant Pages
|