welle has asked for the wisdom of the Perl Monks concerning the following question:
Hello!
I am a sort of newbe in Perl and maybe I am missing something very simple. On a Windows machine (XP) I am trying to access files (txt, hmtl, etc.) stored in folders which contain no english characters (it's greek). The path is not hard coded but is selected through (getSaveFile or getOpenFile).
My path is
C:\Documents and Settings\OT\Desktop\ελληνικά
Let's say I want to save a file in this folder. I have:
sub saving { my $path = $mw->getSaveFile(-initialfile => 'text', -defaultextension => '.txt'); open (OUT, ">$path ") or die $!; print OUT "Hello World!"; close OUT; }
I get the following error: TK::Error No such a file or directory. I found this node http://perlmonks.com/?node_id=872508 but it isnot helping me very much as it creates a new folder (and saves the file inside it).
The problem is obviously of encoding nature... but what should I do to work with Perl/Windos on a "non english speaking" machine?
Thank you for your help. Otto
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl path directory greek
by zentara (Cardinal) on Nov 20, 2010 at 18:19 UTC | |
Re: Perl path directory greek
by Burak (Chaplain) on Nov 20, 2010 at 22:22 UTC | |
by afoken (Chancellor) on Nov 21, 2010 at 00:37 UTC | |
Re: Perl path directory greek
by afoken (Chancellor) on Nov 20, 2010 at 22:47 UTC |