in reply to Storing Lines before and After pattern
my $poem = "...."; if ($poem =~ /DOG/) { print "Before DOG: $`"; print "After DOG: $'"; } [download]
Abigail