I did look at Expect.pm. I suppose my immediate reaction was: "This is immense. Which one of these dozens of functions could be the one I need?" In other words, the learning curve I would face for Expect seemed much greater than what I thought was needed for the task at hand. So I passed on it, but will definitely keep it in mind for similar projects in the future.