in reply to defined array question
perldoc -f defined tells us:
Use of "defined" on aggregates (hashes and arrays) is deprecated. It used to report whether memory for that aggregate has ever been allocated. This behavior may disappear in future versions of Perl.
So that's a bad thing and you shouldn't do that.
But you're not using defined on an array, you're using defined on an array slice. perldoc -f defined is silent on what this does, so the behaviour is undefined. Which means that it's quite possible for it to change between versions of Perl or different architectures.
As others have pointed out, it's difficult to really know what you are trying to do there. Once you've worked it out, we can help you to reimplement it in "real" Perl.
--"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: defined array question
by toadi (Chaplain) on Aug 30, 2002 at 13:45 UTC | |
|
Re: Re: defined array question
by cfreak (Chaplain) on Aug 30, 2002 at 14:28 UTC | |
by davorg (Chancellor) on Aug 30, 2002 at 15:35 UTC |