http://qs321.pair.com?node_id=1218022


in reply to read files one by one in directory and redirct output to a file

"If you're planning to filetest the return values out of a readdir, you'd better prepend the directory in question. Otherwise, because we didn't chdir there, it would have been testing the wrong file."
http://perldoc.perl.org/functions/readdir.html

Ditto for opening for read/write

  • Comment on Re: read files one by one in directory and redirct output to a file