Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Replace strings in text file

by pwagyi (Monk)
on Sep 24, 2018 at 03:22 UTC ( #1222902=note: print w/replies, xml ) Need Help??

in reply to Replace strings in text file

What are you trying to accomplish here? Have you read man page of sed ?

The sed utility is a stream editor that reads one or more text files, makes editing changes according to a script of editing commands, and writes the results to standard output.

Since you are already using perl, why not just use perl to perform substitution (a lot of monks had already given out code) instead of *nix sed, then your code will be portable (across other OSes, like windows).

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2022-05-24 19:19 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.