Usually this kinds of problems turns to be something else that we haven't considered, and probably you already believe that is something wrong with the open ( which might be or not ) and you focus only on that.
Try to write a shorter program that only opens a directory and see if that removes everything, ... or run your program using the debugger with perl -d your_program.pl and check if after each step the directory gets wiped out, if so you'd find the line that did it and you'd be available to write a minimal program that evidences the bug ( or new test case for perl 5.12.X :D )
In reply to Re^3: stdin erases all my files
by bluescreen
in thread [SOLVED]open to read file, erases all my files
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |