in reply to Re: Storing Lines before and After pattern
in thread Storing Lines before and After pattern
If there may be multiple occurrences of DOG, you want:
or $after will only include up to the second DOG.($before, $match, $after) = split /(DOG)/, $poem, 2;
|
---|
In Section
Seekers of Perl Wisdom