in reply to Pulling a file with a given extension
Still, when I run it I get "$datfile ==>" and that's it.
opendir DIR, '.' or die "Cannot open current dir. $!"; print("$_\n") foreach readdir DIR; closedir DIR; [download]
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.