in reply to Problem with saving files using File::Util on Windows

You might do well to read How do I post a question effectively? and take to heart the part about smallest example, in that I think I can replicate your issue without Tk. It would also be good if the script replicated your issue exactly, rather than requiring the monks to input a directory name, i.e. my $directory     = 'C:\temp'; or some such.

The issue with absolute file names under Windows is a known issue, and has an open and acknowledged bug report on CPAN: http://rt.cpan.org/Public/Bug/Display.html?id=46368. I would suggest working with relative paths for now. If this is not an option (you need it now), roll your own using core Perl modules such as File::Path and IO::File.

Replies are listed 'Best First'.
Re^2: Problem with saving files using File::Util on Windows
by kg (Acolyte) on Dec 23, 2009 at 11:07 UTC

    Thank you for your reply. I read "How do I post a question effectively?" and please excuse me for bugging you all with Tk. I apparently had a different understanding of "minimal example". The script replicated my problem, but I see what you mean: "Make it as easy as possible to reproduce the problem using the least amount of lines."

    I used File::Path and IO::File as you suggested and everything is working by now. Thank you again!

      You did reasonable job minimizing the code, but the point I was making was that your issue did not require Tk. If I read a post and see use Tk; up top, I assume the issue pertains to GUI. As I am not familiar with the intricacies of Tk, I'm likely to skip it without much consideration since I figure there are monks more well suited to aid that OP. In addition, testing your code requires I have Tk installed on my machine, and I'm not going to install Tk just to run the code of an unknown netizen.

      In summary, your priorities in creating code to be posted should be first use strict; use warnings;, then the smallest number of dependencies, and finally short but clear code.