in reply to How do you open/read a text , without knowing its encoding, and remove any BOM if its utf, what do you use?
Prints 1 on success. Uses $! on failure.#!/usr/bin/perl -l use strict; use warnings; use String::BOM qw(strip_bom_from_file); my $file = '/path/to/file'; print strip_bom_from_file($file);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do you open/read a text , without knowing its encoding, and remove any BOM if its utf, what do you use?
by Zzenmonk (Sexton) on Apr 23, 2013 at 07:45 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |