mikeysmailbox1
asked on
Perl variable match from end of variable
Hi
I have a variable that has multiple values of the same thing in it.
Example: $A = "prog aaaa sss -d vvv -t fff prog bbbb rrrr -d vvv -t fff";
I need to get just assign each set of "prog" sections its own variable.
Example: $B = "prog aaaa sss -d vvv -t fff";
$C = "prog bbbb rrrr -d vvv -t fff";
I could use split but there could be other values in the string.
Thanks
I have a variable that has multiple values of the same thing in it.
Example: $A = "prog aaaa sss -d vvv -t fff prog bbbb rrrr -d vvv -t fff";
I need to get just assign each set of "prog" sections its own variable.
Example: $B = "prog aaaa sss -d vvv -t fff";
$C = "prog bbbb rrrr -d vvv -t fff";
I could use split but there could be other values in the string.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER