in reply to Executing "perl -pi -e" in perl script
#!/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) ‘ ’ Single quotes +(left and right) #~ U+201C (8220), U+201D (8221) “ ” Double quotes +(left and right) #~ U+201B (HTML: ‛) – 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: ‟) – 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__
|
|---|