in reply to File Handle Basics

dont forget to chomp

chomp(my $file = <STDIN>);