http://qs1969.pair.com?node_id=324323


in reply to Storing Lines before and After pattern

What do you mean with "I can't get my head around the new lines"? $` and friends don't need anything special for newlines.
my $poem = "...."; if ($poem =~ /DOG/) { print "Before DOG: $`"; print "After DOG: $'"; }

Abigail