Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Ksh style select menus in perl

by jdporter (Paladin)
on Apr 27, 2005 at 17:39 UTC ( [id://452046]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub ksh_select(&@) {
      my $cr = shift;
    ...
        $cr->( $_ );
      }
    }
    
  2. or download this
    ksh_select { print "You chose $_\n" } qw( foo bar quux );
    
  3. or download this
    # in this example, the user has choices to navigate around some struct
    +ure.
    my %dispatch = (
    ...
        ? $dispatch{$menu[$_]}->()
        : warn "Selection out of range!\n";
    } @menu;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://452046]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-24 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found