title: prompting multiple questions to user (yes/no & file name input)
body: <p>I want to ask the user multiple questions. I have two types of questions: Y/N or filename input. I'm not sure how to place this all into a nice <code>if</code> structure. And I'm not sure if I should use 'else' statements too. Could someone help we with this? This is what I have so far:</p>
  
  <pre><code>print "Do you want to import a list (Y/N)?"; # first question yes/no
  my $input = &lt;STDIN&gt;;
  chomp $input;
      if ($input =~ m/^[Y]$/i){ #match Y or y
          print "Give the name of the first list file:\n";
          my $list1 = &lt;STDIN&gt;; 
          chomp $list1;
          print "Do you want to import another gene list file (Y/N)?";
              if ($input =~ m/^[Y]$/i){
                   print "Give the name of the second list file:\n" # can I use $input or do I need to define another variable?;
                   $list2 = &lt;STDIN&gt;;
                   chomp $list2;
                   print "Do you want to import another gene list file (Y/N)?";
              }
      }
  </code></pre>