| Server IP : 162.241.219.206 / Your IP : 216.73.216.195 Web Server : Apache System : Linux box5669.bluehost.com 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 08:51:45 EDT 2026 x86_64 User : signavd5 ( 2863) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/perl-IO-HTML/examples/ |
Upload File : |
#!/usr/bin/perl
#---------------------------------------------------------------------
# This example is hereby placed in the public domain.
# You may copy from it freely.
#
# Detect the encoding of files given on the command line
#---------------------------------------------------------------------
use strict;
use warnings;
use IO::HTML qw(html_file_and_encoding);
for my $filename (@ARGV) {
my ($filehandle, $encoding, $bom) = html_file_and_encoding($filename);
close $filehandle;
$encoding .= " BOM=$bom" if defined $bom;
print "$filename: $encoding\n";
}