in reply to Passing an array into an open command
#!/usr/bin/perl -w use strict; while (<STDIN>) { print "PROCESSED $_"; }
As a sidestep: if you use 'open', please check if it succeeds, like:#!/usr/bin/perl -w use strict; $|++; use IPC::Open2; my @loglines=("This is not a relevant logline", "This is not a relevant logline", "This might be an interesting logine", "Another interesting logline"); open2(*READ,*WRITE,"./test3.pl") or die; foreach my $inputline (@loglines) { print WRITE "$inputline\n"; } close (WRITE); my $outputline; while ($outputline = <READ>) { print $outputline; }
open(RUN, "/usr/local/bin/ticket @ABC|") or die "useful error message +here";
|
|---|