diff --git a/lib/Subtitle/BASE.pm b/lib/Subtitle/BASE.pm index f120a93..ffb9700 100644 --- a/lib/Subtitle/BASE.pm +++ b/lib/Subtitle/BASE.pm @@ -22,7 +22,7 @@ sub log { sub chomp { my ($self, $line) = @_; return unless defined $line; - return $line =~ s/[\r\n]+$//or; + return $line =~ s/(^\xEF\xBB\xBF|[\r\n]+$)//ogr; } sub trim {