Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: General pattern for interactive text-mode script?

by apl (Monsignor)
on Jul 03, 2008 at 23:19 UTC( #695494=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
        'Major task to perform?' => ['task_1','task_2','task_2'],
  2. or download this
        'Major task to perform?' =>
             answers => [ 'Add',   'Delete', 'Rename' ],
             keys    => [ 'task_1','task_2', 'task_2' ],
  3. or download this
    my $current_key = 'Major task to perform?';
    while ( my $choice = prompt( $current_key, ...)) {
        # else $current_key = $structure{$current_key}{keys}[INDEX]
    <p>A lot of the code is left as an exercise to the reader. Good luck w
    +ith your class.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-08-30 00:15 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (410 votes). Check out past polls.