in reply to
Re: Use a perl variable on a command that prompts for input
in thread Use a perl variable on a command that prompts for input
In addition to Ken's three options here, there is also the possibility of using echo inside the system command as in:
system ("echo my_input | some_command arg arg arg");
The advantages I find in this are that it is simple and can easily be tested in the shell before embedding it in your Perl script.
The downside is mostly a lack of portability but also perhaps consideration of properly escaping my_input to cope with the possible shell expansions.