Use array slice ...
@p[ 1 , 3 , 5 ] = ( 0 , 2 , 4 );
Whoops... Corrected the delimiters for the slice. So much for linking to perldata, let alone giving advice. (Shame, shame!)
In reply to Re: replacing many items in an array
by parv
in thread replacing many items in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |