in reply to Re^2: Pulling a file with a given extension
in thread Pulling a file with a given extension

Do you see "test.dat" outputted when you do
opendir DIR, '.' or die "Cannot open current dir. $!"; print("$_\n") foreach readdir DIR; closedir DIR;

If so, I suspect the filename isn't actually "test.dat". Maybe it has a trailing space. Maybe there's some funky character in there that's not getting displayed.