in reply to Storing Lines before and After pattern
This will break on every occurance of DOG, my @parts = split /DOG/, $poem;
This will break on the first occurance, my ($before, $after) = split /DOG/, $poem, 2; You can also do things with regexes or substr, rindex, and index
After Compline,
Zaxo
|
|---|