in reply to how to manage a large console menu

For even more maintainability try this extension of the menu code from above (in Re: how to manage a large console menu). It stores the sytem name, and the ftp hostname in a single hash. Sub menu automatically sorts and numbers your choices, so there is no need to painstakingly renumber every time you insert a new host.
%choices = ( "system1" => "hostname_for_system1", "system2" => "hostname_for_system2", "system3" => "hostname_for_system3", ); #displays the menu sub menu { my $i = 0; my @sorted_keys = sort(keys %choices); print "Please pick which system you wish to FTP to:\n"; foreach $key (@sorted_keys) { printf "%3d) %s\n", ++$i, $key; } chomp(my $option = <>); return $choices{$sorted_keys[$option-1]} if $option >= 1 && $optio +n <= scalar(@sorted_keys); } $pick = menu; print "system picked = $pick\n"; # do_something_with($pick);