Solved

PERL Main and Submenu driven application

Posted on 2008-10-01
4
676 Views
Last Modified: 2010-07-05
Hi,
I want to develop an PERL based Menu driven application which has Main Menu and Multiple SubMenus and Submenu has again Submenus. ROlling back to Parent Menu is one of options. How do I write this kind of Menu Driven program in perl. Appreicate syntax and logic help in this regard.
0
Comment
Question by:v_sriharsha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 22619757
0
 

Author Comment

by:v_sriharsha
ID: 22624283
My Perl application runs on HPUX as console application. It is an interactive console application on HPUX. For ex:
Main Menu
**************
1. select1
2. Select2
3. select 3.

Enter the option : 1
# Here sub menu should appear
Select1 Submenu
1.  option1
2.  option2
3. optons3
Enter the option: 1

select options1 submneu:
1. cmd1
2. cmd2
3. cmd3
Enter ok to continue, b to previous menu or e to Abort:

THis is the kind of menu driven programm i am looking for..But in Perl I dont know the syntax of how to write this kind of programm.. Is there any object oriented way or writing this interactive programm.

Apreicate your help
Regards
0
 
LVL 28

Accepted Solution

by:
FishMonger earned 250 total points
ID: 22624532
I have not used either of these, but here are 2 modules that you might test.

http://search.cpan.org/~corliss/CursesWidgets-1.997/Widgets/Menu.pm
http://search.cpan.org/~dazjorz/Term-Menu-0.09/lib/Term/Menu.pm

You should also do some additional searching on cpan, such as:
http://search.cpan.org/search?query=curses&mode=all

Initially I wouldn't worry about the syntax needed to build a menu system.  I'd start by creating a detailed flowchart of your entire program.  Next would be to take each of the items in the flowchart and write the pseudo code.  Once the pseudo code is done then look into the required syntax.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question