#!/usr/bin/perl -w use strict; use utf8; open(my $fh, '<:encoding(UTF-8)', $ARGV[0]) or die "Can't read $ARGV[0]: $!\n"; my $fileln = <$fh>; $fileln =~ tr/’/'/; ...[ do something with $fileln ]...