Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Print text on the same line after match

by johngg (Canon)
on Dec 15, 2018 at 14:24 UTC ( [id://1227300]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Print text on the same line after match
in thread Print text on the same line after match

The command switch /i accomplishes almost the same thing

I would say it might accomplish something vaguely similar but it doesn't satisfy the main requirement of the OP's script which is to rename the file. Since the content of the original file is not being changed in any way but is only being queried to provide the new filename I don't think that in-place editing using -p is appropriate. All it can do here is write exactly the same content to the same filename, with the possibility of leaving an identical backup file behind as well. Also, as far as I can see the OP is only using -n in the unnecessary system call inside the script to the Perl one-liner; we only see part of the main script from the look of it.

Cheers,

JohnGG

Log In?
Username:
Password:

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

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

    No recent polls found