Specifying the input encoding
use 5.020; use strict; use warnings; use autodie; use utf8; my $product_file = 'product-list.txt'; open my $fh, '<:encoding(utf8)', $product_file; binmode(STDOUT, ':encoding(utf8)'); while ( <$fh> ) { s/GBP/£/; s/EUR/€/; s/USD/\$/; print; }