in reply to Passing user input to a shell command
So, instead of
open(IN, $file) or die "The file $file". "is not present.\n"; [download]
use
open my $IN, "<", $file or die "can't open $file: $!"; [download]