On May 29, Walt Mankowski said:
>On Tue, May 29, 2001 at 11:59:18AM -0700, Randal L. Schwartz wrote:
>> >>>>> "Brett" == Brett W McCoy <[EMAIL PROTECTED]> writes:
>>
>> >> Uh, careful. This got added to 5.6.1 to support pseudo-hashes and is
>> >> probably coming back out when pseudo-hashes get removed in 5.10.
>> >> ("Death to pseudo-hashes!")
>>
>> Brett> Argh. I didn't realize that. Is this specifically delete on array
>> Brett> elements?
>>
>> Yes.
>
>Is there any difference in 5.6.1 between
>
> delete $array[$index];
>
>and
>
> $array[$index] = undef;
Yes, when $index == $#array.
@foo = ('a' .. 'z');
delete $foo[3];
print scalar @foo; # 26
delete $foo[25];
print scalar @foo; # 25
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** I need a publisher for my book "Learning Perl's Regular Expressions" **