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

my $__FILE__ = __FILE__;

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

if ($^O !~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
    print "ok - 1 # SKIP $^X $0\n";
    exit;
}

if ($ENV{'PERL5SHELL'} =~ /Win95Cmd\.exe/xmsi) {
    print "ok - 1 # SKIP $^X $0\n";
    exit;
}

mkdir('directory',0777);
mkdir('D‹@”\',0777);
open(FILE,'>D‹@”\/file1.txt') || die "Can't open file: D‹@”\/file1.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D‹@”\/file2.txt') || die "Can't open file: D‹@”\/file2.txt\n";
print FILE "1\n";
close(FILE);
open(FILE,'>D‹@”\/file3.txt') || die "Can't open file: D‹@”\/file3.txt\n";
print FILE "1\n";
close(FILE);

# system
my $command;
if (($ENV{'PERL5SHELL'}||$ENV{'COMSPEC'}) =~ / \\COMMAND\.COM \z/oxmsi) {
    $command = 'dir /b D‹@”\ >NUL';
}
else {
    $command = 'dir /b D‹@”\ >NUL 2>NUL';
}
if (system($command) == 0) {
    print "ok - 1 system $^X $__FILE__\n";
}
else {
    print "not ok - 1 system: $! $^X $__FILE__\n";
}

unlink('D‹@”\/file1.txt');
unlink('D‹@”\/file2.txt');
unlink('D‹@”\/file3.txt');
rmdir('directory');
rmdir('D‹@”\');

__END__