in reply to How to merge the given snippet of code into the below functionality.

Rather than rolling your own interaction routine you might try IO::Prompter or IO::Prompt from CPAN.

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re: How to merge the given snippet of code into the below functionality.