I am trying to write a perl script with inline replacement. I found this example script for this, but not sure how to use it, since I'm not sure how to specify the file and handler?
$^I = '.bak' # Call for in-place editing; make backups with a .bak suffix while (<>) { s/foo/bar/ print; }
<> - a special file descriptor.
<>
Special file descriptor: <>, , < > , , . . , STDIN. UNIX, "-" , STDIN .
Special file descriptor: <>
, , < > , , . . , STDIN. UNIX, "-" , STDIN .
$^I - , .
$^I
script, , , :
perl yourscript.pl somefile.txt
Source: https://habr.com/ru/post/1781067/More articles:How to make Nginx aware of Rails code changes - ruby-on-railsSandcastle or NDoc? Good msdn-like doc generator? - documentation-generationmemmove does not move - c ++Rails 3 I18n label_tag translation - ruby-on-rails-3jquery: hide / show based on variable for class name - jqueryFilters against $ _POST (or $ _GET) - filterStrictMode confusion - how is it not? - androidHaving a class or function as a template parameter - c ++The fastest way to load sketch pixel values ββin Java - javadisplaying texture on a square (Android) - androidAll Articles