Solved

PERL Main and Submenu driven application

Posted on 2008-10-01
4
671 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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