PerlIO::bom - Automatic BOM handling in Unicode IO
version 0.001
open my $fh, '<:bom(utf-8)', $filename;
This module will automate BOM handling. On a reading handle, it will try to detect a BOM and push an appropriate decoding layer for that encoding. If no BOM is detected the specified encoding is used, or UTF-8 if none is given.
A writing handle will be opened with the specified encoding, and a BOM will be written to it.
This modules does not have to be loaded explicitly, it will be loaded automatically by using it in an open mode. The module has the following general syntax: :bom(encoding) or :bom. The encoding may be anything :encoding accepts.
:bom(encoding)
:bom
:encoding
Leon Timmermans <leont@cpan.org>
This software is copyright (c) 2015 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install PerlIO::bom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PerlIO::bom
CPAN shell
perl -MCPAN -e shell install PerlIO::bom
For more information on module installation, please visit the detailed CPAN module installation guide.