更新时间:2023-02-08 12:06:50
很难从你的问题中确切地说出你想要做什么,但这可能会解决问题
It's difficult to tell from your question exactly what you want to do but this might do the trick
open(my $program, "$command|") or die "$command $!"; #open program on a pipe
my @results=();
while(<$program>) {
push @results,$_; # store output
}
其他选项见 perldoc perlipc http://perldoc.perl.org/perlipc.html
For other options see perldoc perlipc http://perldoc.perl.org/perlipc.html