http://www.perlmonks.org?node_id=967152


in reply to Calling and interacting with external executable

Can you pipe the selection to the executable?

system( qq{ echo 1\n | $program });