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

Re^3: In place search and replace with a hash

by AnomalousMonk (Archbishop)
on Dec 28, 2014 at 03:52 UTC ( [id://1111517]=note: print w/replies, xml ) Need Help??


in reply to Re^2: In place search and replace with a hash
in thread In place search and replace with a hash

From this example it looks like it would be easy to print to output ...

As a first step, create a small test input file and just print the altered and unaltered lines to standard output, e.g.,
    print $my_new_line_what_is_just_the_way_i_want_it;
When this limited, test output looks ok, start to think about the process of opening a new file and writing to that file instead of STDOUT. When that looks ok, start thinking about all the input/output file verification and renaming that has to happen. (I'm sure there are modules to facilitate the "edit in place" process, but I don't know what they are off-hand.)


Give a man a fish:   <%-(-(-(-<

Log In?
Username:
Password:

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

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

    No recent polls found