The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# encoding: KPS9566
# This file is encoded in KPS9566.
die "This file is not encoded in KPS9566.\n" if q{‚ } ne "\x82\xa0";

my $__FILE__ = __FILE__;

use Char;
print "1..2\n";

my $chcp = '';
if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
    $chcp = `chcp`;
}
if ($chcp !~ /932|949/oxms) {
    print "ok - 1 # SKIP $^X $__FILE__\n";
    print "ok - 2 # SKIP $^X $__FILE__\n";
    exit;
}

open(FILE,'>F‹@”\') || die "Can't open file: F‹@”\\n";
print FILE "1\n";
close(FILE);
mkdir('D‹@”\', 0777);
open(FILE,'>D‹@”\/a.txt') || die "Can't open file: D‹@”\/a.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D‹@”\/b.txt') || die "Can't open file: D‹@”\/b.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D‹@”\/c.txt') || die "Can't open file: D‹@”\/c.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D‹@”\/F‹@”\') || die "Can't open file: D‹@”\/F‹@”\\n";
print FILE "1\n";
close(FILE);
mkdir('D‹@”\/D‹@”\', 0777);

$_ = 'F‹@”\';
if (@_ = stat($_)) {
    print "ok - 1 $^X $__FILE__\n";
}
else{
    print "not ok - 1 $^X $__FILE__\n";
}

$_ = 'D‹@”\';
if (@_ = stat($_)) {
    print "not ok - 2 $^X $__FILE__\n";
}
else{
    print "ok - 2 $^X $__FILE__\n";
}

unlink('F‹@”\');
rmdir('D‹@”\/D‹@”\');
unlink('D‹@”\/a.txt');
unlink('D‹@”\/b.txt');
unlink('D‹@”\/c.txt');
unlink('D‹@”\/F‹@”\');
rmdir('D‹@”\');

__END__

Perlƒƒ‚/Windows‚ł̃tƒ@ƒCƒ‹ƒpƒX
http://digit.que.ne.jp/work/wiki.cgi?Perl%E3%83%A1%E3%83%A2%2FWindows%E3%81%A7%E3%81%AE%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%83%91%E3%82%B9

ƒtƒ@ƒCƒ‹ŠÖ˜AƒRƒ}ƒ“ƒh‚Ì“®ìŠm”F
u‹@”\v‚Æ‚¢‚¤•¶Žš—ñ‚ð•Ï”$_‚É“ü‚êAstat($_)‚Æ‚µ‚Ä‚à•Ô‚è’l‚ª‚È‚¢