use open IN => ':raw'; while (<>) { # code for each line }