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
In Section
Seekers of Perl Wisdom