in reply to Re: Search and Replace Elements from 1 array to another.
in thread Search and Replace Elements from 1 array to another.
Thanks! That is what I was looking for. One addition needed is that if a match was found it would replace the match along with the rest of the pre split element if possible.
Apologies for not wording that better.
Current output $VAR1 = 'nbu103 Disk 6 -1'; $VAR2 = 'nbu104 Disk 6 -1'; $VAR3 = '204_tape 1 1 ACS1'; $VAR4 = 'nbu101 Disk 6 -1'; Needed output $VAR1 = '103_dsu 1 35 nbu103 Disk 6 -1'; $VAR2 = '104_dsu 1 35 nbu104 Disk 6 -1'; $VAR3 = '204_tape 1 1 ACS1'; $VAR4 = '101_dsu 1 35 nbu101 Disk 6 -1';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Search and Replace Elements from 1 array to another.
by Riales (Hermit) on Apr 03, 2012 at 17:46 UTC |
In Section
Seekers of Perl Wisdom