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

"Greg London" <email-2Ro/Dj86MvDSUeElwK9/[email protected]> Thu, 9 Jan 2020 11:38:54 -0600
Newsgroups gmane.comp.lang.perl.perl-mongers.boston
Message-ID <[email protected]>
This is for a script at work
And they run perl 5.8



On Wed, January 8, 2020 7:57 pm, Randal L. Schwartz wrote:
>>>>>> "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
>
>


--