运行需在命令行前加perl, 如perl *.pl
#!/usr/bin/perl -w
my $strfilename = '/home/ldd/Desktop/list.txt';
my $strline;
my $strcommand;
open( FILE, $strfilename ) || die "count not read from $strfilename";
while ( $strline=
{
chomp ( $strline );
$strcommand = '/home/ldd/toolkit/charniak/PARSE/parseIt -K -LCh -l200 /home/ldd/toolkit/charniak/ctb5.1/ /home/ldd/Desktop/ACE2005CN/'.$strline.' > /home/ldd/Desktop/ACE2005CN/'.$strline.'.charniak';
print $strcommand."\n";
system( $strcommand );
}
close FILE;
没有评论:
发表评论