Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2015-07-01 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls