develooper Front page | perl.perl5.porters | Postings from June 2021

Re: idea: everything-slices

Thread Previous | Thread Next
Eirik Berg Hanssen
June 20, 2021 02:59
Re: idea: everything-slices
Message ID:
On Sun, Jun 20, 2021 at 3:54 AM Ricardo Signes <>

> …
> This provides an easy way to get all the keys and values of an array,
> which pairs nicely with multi-target for:
> for my ($i, $v) (@array[*]) {
>   ...
> }
  Typo: s/@array/%array/

  … right?  (I'm not used to i/v array slice syntax yet, but if that's not
the intent, I'm missing something here.)

  On the bikeshedding, I was also thinking of @array[], though that makes
me think of Raku's Zen slices:

  So … are there any traps in confusing everything-slices with Zen slices?

  Alterntively, are there traps in confusing everything-slices with Raku's
Whatever-slicing (which gets the star)?


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About