$term = Term::ReadLine->new('selection'); $name = $term->get_reply(prompt => 'select a name', choices => \@arrayOfChoices); ...