While I'm glad you've answered your own question, I have to admit that I'm confused by it. I would expect that the "set"s and the "status" are commands that lsnrctl should receive, and not be separate commands. In that case, I would have expected that they needed to be sent to lsnrctl's STDIN. The easiest way to do that would be:
though that's definitely not the most perlish (and probably won't quite work as-is on Windows). Something more like:system(<<EOF) and die "couldn't run listener control: $?"; echo "set password 'oracle' set current_listener 'LISTENER' status" | lsnrctl EOF
is probably closer, and far more perlish.open my $fh, "|-", "lsnrctl" or die "can't run listener control: $?"; print $fh <<EOF; set password 'oracle' set current_listener 'LISTENER' status EOF close $fh;
In reply to Re: Heredoc with system call
by Tanktalus
in thread Heredoc with system call
by curtisb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |