Re: [Boston.pm] delete($_[2]); doesn't

[email protected] (Randal L. Schwartz) Wed, 08 Jan 2020 17:57:46 -0800
Newsgroups gmane.comp.lang.perl.perl-mongers.boston
Message-ID <[email protected]>
>>>>> "Greg" == Greg London <email-2Ro/Dj86MvDSUeElwK9/[email protected]> writes:

Greg> use Data::Dumper;

Greg> sub killer{
Greg> 	delete($_[2]);
Greg> }

Greg> my @list = qw( alpha bravo charlie delta echo fox);
Greg> print Dumper \@list;
Greg> killer(@list);
Greg> print Dumper \@list;


Greg> I would expect the second Dumper statement to show one less element.
Greg> Greg

This is a relatively modern feature.  How old is your Perl?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/Dart consulting, Technical writing, Comedy, etc. etc.
Still trying to think of something clever for the fourth line of this .sig