http://www.perlmonks.org?node_id=571475


in reply to perl's command line snippet which I read from a perl article ( perl tutrous )

I have been known to use  perl -pi-DIST -e0 file1 file2 file3.... as a "poor man's change control", to save the "distribution" versions of a Makefile or config file as "Makefile-DIST" and so on. The nice thing about the in-place "non-edit" is that permissions and ownership are retained automatically.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on Re: perl's command line snippet which I read from a perl article ( perl tutrous )
  • Download Code