in reply to replacing many items in an array
Use array slice ...
@p[ 1 , 3 , 5 ] = ( 0 , 2 , 4 ); [download]
Whoops... Corrected the delimiters for the slice. So much for linking to perldata, let alone giving advice. (Shame, shame!)