The previous answers were pretty good but in case you are still confused here you go:
my @array = qw(A R N D); # is equivalent to my @array = (); $array[0] = 'A'; $array[1] = 'R'; $array[2] = 'N'; $array[3] = 'D';
So it should be obvious to you how you can overwrite any part of the array...simply reference it by its index:
$array[0] = 'B';
Celebrate Intellectual Diversity
In reply to Re: replace/ overwrite values of arrays!
by InfiniteSilence
in thread replace/ overwrite values of arrays!
by madM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |