Can I prompt for user input after reading piped input on STDIN in Perl?

I'm trying to write a perl script that reads piped data, then prompts the user for input based on that data. The following script, prompt_for_action, is what I am trying to do: #!/usr/bin/perl my @