HEX
Server: Apache
System: Linux nc-ph-4101.simplemoneygoals.com 5.14.0-503.21.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jan 12 09:45:05 EST 2025 x86_64
User: dailygoldindex (1004)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/doc/perl-IO-HTML/examples/detect-encoding.pl
#!/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";
}