1
我想處理許多文件/字符串到Perl中,不要等待stdin從批處理文件中作出響應。怎樣才能批處理文件?如何通過批處理文件發送stdin到perl程序?
比如我有test.pl,內容是
my $o=<STDIN>;
print "$o\n";
my $c=<STDIN>;
print "$c\n";
而且一個批處理文件在任何時間執行不同的標準輸入test.pl
認爲批處理文件的功能將是
perl test.pl <stdin> <stdin>
perl test.pl <stdin> <stdin>
perl test.pl <stdin> <stdin>
perl test.pl <stdin> <stdin>
那麼我想知道如何將標準輸入發送到test.pl.