because $dir doesnt end with a path seperator. getcwd returns the path _without_ a trailing seperator:open (DAT,">${dir}${TextFile}") or die $!;
So I bet if you look around youll find a bunch of files that start with the directory name you thought you were writing to in those directories parents.D:\Development>perl -MCwd -e "print getcwd" D:/Development D:\Development>perl -MCwd -e "$f='test.pl'; $p=getcwd; print \"$p$f\"" D:/Developmenttest.pl
To verify that this is correct (im 99.999999 certain it is) just do
before your open and then have a look at your server logs.die "${dir}${TextFile}";
HTH
BTW, please dont use pre tags in your posts. And if you do please close them correctly. :-)
Yves / DeMerphq
---
Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)
In reply to Re: output to another directory
by demerphq
in thread output to another directory
by wolverina
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |