in reply to how could I use map here?
Note: if you do that, then the actual values in @my_array will be modified, since $value is an alias for each one. In that case, you don't need @my_array_2 at all because @my_array will contain the modified values. You might write the code like this:
If you don't want to modify the original array, then localize $_ or use a temporary variable in your map, maybe like this:s/^CHOP_ME_OFF_// for @my_array;
@my_array_2 = map {local $_=$_; s/^CHOP_ME_OFF_//; $_} @my_array;
-- Mike
--
just,my${.02}
|
|---|