Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Storing Lines before and After pattern

by Abigail-II (Bishop)
on Jan 27, 2004 at 01:00 UTC ( #324323=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://324323]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2021-09-24 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?