Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Storing Lines before and After pattern

by Abigail-II (Bishop)
on Jan 27, 2004 at 01:00 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found