- or download this
my $octets = encode("utf8", $line);
$octets =~ s/^\x{ef}\x{bb}\x{bf}//;
$line = decode("utf8", $octets);
- or download this
my $BOM = decode("utf8", "\x{ef}\x{bb}\x{bf}");
$line =~ s/^$BOM//;
- or download this
my $BOM = chr(0xFEFF);
$line =~ s/^$BOM//;
- or download this
$line =~ s/^\x{FEFF}//;