Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    To handle unicode I am using utf8::all so your both should work: perl -Mutf8::all -pe 's/.*(..)$/$1/' file or perl -Mutf8::all -CIO -pe 's/.*(..)$/$1/' file. Commented Nov 5, 2015 at 18:31
  • @taliezin thanks, that helped. After installing the utf8::all module, the command you gave did indeed work as expected. I would still like to have the standard -CIO options working though. I shouldn't need to call another module for this. Commented Nov 5, 2015 at 18:35
  • perldoc.perl.org/perlunicode.html -- this is one area where Perl is behind other languages. Commented Nov 5, 2015 at 18:37
  • @glennjackman perhaps, but I know this sort of think used to work on my Debian and Choroba has confirmed that it works on his system. So, there should be a way to get it to work on my Arch as well. Commented Nov 5, 2015 at 18:38