I really don't know. I am sure that a CPAN module could be built that would offer the same functionality, but the interface would most likely be different (OOP based?). To elaborate on what select does, here is some code for those interested to play with:
#!/usr/bin/ksh PS3="Enter your choice :" select menu_list in English francais do case $menu_list in English) print "Thank you";; francais) print "Merci";; *) print "???"; break;; esac done

That is pretty slick. :) Here are some guidelines from the Kornshell '93 manual to go by for anyone wishing to do a little porting:

select vname in word  . . .  ] ;do list  ;done

UPDATE:
Here is my go at it - pure evil:

no strict; use constant PS3 => 'Enter your choice :'; my %menu = ( English => sub { print "Thank you\n" }, fancais => sub { print "Merci\n" }, none => sub { print "???\n"; exit }, ); while (1) { &select(menu_list => in => qw(English fancais)); $menu{$menu_list}->(); } sub select { my ($var,$in,@list) = @_; unless ($i) { printf STDERR "%d) %s\n", ++$i, $_ for @list; } push @list,undef; print STDERR PS3; chomp($ans = <>); unless ($ans) { $i = pop @list; &select($var,undef,@list); } $$var = $list[$ans-1] || 'none'; }

Yes, i am actually doing a Bad Thing and turning off strict. Why? Because i wanted to use menu_list as symbolic var - not really a good thing, but it remains close to the syntax of ksh's select. I opted to use a hash (%menu) instead of a case - much nicer. pushing an undef value onto @list inside select() is a trick to handle the user select anything other than a positive integer. Also, you must prefix the call to select() with an ampersand, else Perl will execute the built-in select. I almost got the REPLY being null behavior to work - see if you can find the bug. ;)

I don't recommend using this code, this is just for fun. :)

jeffa

Hadn't touched Kornshell since 1996

In reply to (jeffa) Re: Ksh by jeffa
in thread Ksh style select menus in perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.