#!/usr/bin/perl use open IN => ":utf8"; # Now all file handles opened for input (including ARGV) # will use utf8 encoding unless told otherwise while (<>) { do_whatever( $_ ); }