Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by apl (Monsignor)
on Jul 03, 2008 at 23:19 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://695494]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found