Its documented in perlrun under -i[extension]. Here is an example (based on this)
#!/usr/bin/perl -- use strict; use warnings; use open qw' :std :encoding(UTF-8)'; Main( @ARGV ); exit( 0 ); sub Main { local ( *ARGV, $^I ); @ARGV = @_; $^I = '.orig'; while(<>){ #~ U+2018 (8216), U+2019 (8217) &lsquo; &rsquo; Single quotes +(left and right) #~ U+201C (8220), U+201D (8221) &ldquo; &rdquo; Double quotes +(left and right) #~ U+201B (HTML: &#8219;) – single high-reversed-9, or single reversed + comma, quotation mark (This is sometimes used to show dropped charac +ters at the end of words, such as goin? instead of using goin‘, goin +’, goin`, or goin'[citation needed]) #~ U+201F (HTML: &#8223;) – double high-reversed-9, or double reversed + comma, quotation mark y/\x{2018}\x{2019}\x{201B}\x{201C}\x{201D}\x{201F}/'''"""/; print; } } __END__

In reply to Re: Executing "perl -pi -e" in perl script by Anonymous Monk
in thread Executing "perl -pi -e" in perl script by nbokare

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.