in reply to Parse cmd line args in this file

You might need to specify full path to your file if your script is not in the same dir.

open(my $fh,'/full/path/to/file/data4.txt') or die "Could not open file [$!]";