Why does the following perl script not print anything?
if (open(my $fh, "| (while read LINE; do echo \$LINE; done )")) {
print $fh "test";
close($fh);
}
In sh, if I run echo 'test' | (while read LINE; do echo \$LINE; done ) I would expect to have test be printed out.
print $fh "test\n";open my $fh, "|-", ".."as perl favors three argsopen. ("-|"to rad from pipe)