in reply to Passing password with command
Try this:
update 2: redirecting the output shouldn't have any serious consequences, but it may help in that it may show error messages that otherwise might get redirectedmy $pwd1 = "pwd1"; my $pwd2 = "pwd2"; open(FOO, "|$command") or die "open command failed: $!"; print FOO "$pwd1\n$pwd2\n"; close FOO;
|
|---|