in reply to unable to open input file

Check to see if you are getting an error message by printing $!:
open(INP,"+>", $file) or die "couldn't open input file: $!";

The usual suspects are that you do not have permissions to read a file, or that you are not looking in the directory you think you are looking in, or you made a typo in the file name on your command line.