且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在不使用系统的情况下从 perl 调用 java 类

更新时间: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