#displays the menu sub menu { print "Please pick which system you wish to FTP to:\n"; print "1.) system1\n"; print "2.) system2\n"; etc.. etc.. chomp(my $option = <>); } #switch statment using switch::perlish #hostnames changed to protect the innocent while ($option ne "q") { menu(); switch $option, sub { case '1', sub {dftp("hostname_to_system1")}; case '2', sub {dftp("hostname_to_system2")}; etc etc case 'q', sub {exit}; }