in reply to updating an array of strings
my @array = ( 'foo', 'moo', 'baz' ); splice @array, 1, 1, 'bar';
The downside to this approach is that you will need to know the array position of the string which you are looking at modifying. If you do not know this index, then you would be better off exploring a loop or map construct as suggested and depending upon your requirements - Also of interest might be this node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(2): updating an array of strings
by Arien (Pilgrim) on Aug 26, 2002 at 06:40 UTC | |
by BrowserUk (Patriarch) on Aug 26, 2002 at 08:39 UTC | |
by theorbtwo (Prior) on Aug 26, 2002 at 10:39 UTC |