Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: parsing a multi-line pattern and replacing

by rjt (Curate)
on Apr 24, 2014 at 19:35 UTC ( [id://1083675]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use File::Slurp 'edit_file';
     
    edit_file { s!<default>.+?</default>!<default>enabled</default>!sg } '
    +inputfile';
    
  2. or download this
    this is line 1
    this is line 2
    <default>enabled</default>
    this is line 3
    <default>enabled</default>
    this is last line
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found