37,719
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Info>
<info>E:\王小小</info>
</Info>
#!/usr/bin/perl -w
use XML::Parser;
use XML::Simple;
use Encode;
use strict;
use DBI;
binmode(STDIN, ':encoding(utf8)');
binmode(STDOUT, ':encoding(gb2312)');
binmode(STDERR, ':encoding(utf8)');
my $file = "path.xml";
my $config = eval{ XMLin($file )}||die "Error: $!";
my $bk = $config->{"info"};
print "$bk\n";
opendir DIR, $bk or die "Can not open $bk\n";
my @filelist = readdir DIR;
foreach $file (grep(!/^\.\.?$/,@filelist)) {
print $bk."\\".$file."\n";
}
use Encode qw(from_to);
my $bk = from_to($config->{"info"}, "utf-8", "gbk");