The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Filter::Encoding - Write your script in any encoding


Version 0.01


  use Filter::Encoding 'MacRoman';
  # Code that follows can be written in MacRoman encoding.


This module allows your code to be written in any ASCII-based encoding. Just pass the name of the encoding as an argument to use Filter::Encoding. The source code will be decoded and treated as though it had been written in UTF-8 with use utf8 in effect. That's all this module does.

It is intended as a simpler, saner replacement for, one that does not change the up- and downgrading of strings or touch your file handles.


Too many arguments to Filter::Encoding->import()

use Filter::Encoding (which implies ->import) only allows one argument.

Filter::Encoding: Unknown encoding '%s'

The encoding must be one recognized by the Encode module.


perl 5.8.0 or later


Copyright (C) 2016 Father Chrysostomos <sprout [at] cpan [dot] org>

This program is free software; you may redistribute it, modify it, or both under the same terms as perl.


Much of the code was based on the filter feature of


Encode, encoding

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 71:

'=item' outside of any '=over'

Around line 80:

You forgot a '=back' before '=head1'