in reply to testing functions that prompt user or call external commands

I think you can use Test::Expect.
  • Comment on Re: testing functions that prompt user or call external commands