in reply to Re^2: File read and strip
in thread File read and strip

The files are user-input, so the $file=<> has worked fine for me in the past.
I think he was assuming that the file name was coming from the command line. @ARGV is the array of command line arguments, so "shift @ARGV" removes and returns the first argument. If you want the user to enter a file name, then it would be a good idea to prompt for it, e.g.:
print "Enter filename: "; chomp(my $file = <STDIN>);
what does the $! in the die function do?
See perlvar. It is the error message for system/library calls. You want to check to see if open fails, and if it does, see why it failed.