Hi Markus,
I’m looking for a way to call an external program and get back the
result in an array without seeing anything on the STDOUT.
If ‘m using in example
$path = “\\”;
$result = system(“dir”, $path);
I can see the output on the STDOUT but I can’t find a way to put it in
an array
Marcus:
Here's some code that will execute your command and
return what would normally go to STDOUT to the array
@lines.
my $path = \\;
my $cmd =
dir$path";my
@lines;open X, "$cmd |"; @lines = X;close
X;
foreach my $line
(@lines){ print "$line\n"; }
Ken
-Original