I'm trying to wrtie a menu perl script which will allow users to connect to different servers from a management server without having to know the long server name.
I have written the below code, but when I execute it I manage to get through the first 2 menus but it doesn't exit once connected to the server (I thought the Last command would cause the Loop to exit).
...
I have written the below code, but when I execute it I manage to get through the first 2 menus but it doesn't exit once connected to the server (I thought the Last command would cause the Loop to exit).
Any ideas?
Change the "=" operator in the following lines to the "eq" operator:
The numbers on the left are the line numbers in the Perl program.
You want to compare $choice to the strings '1', '2', '3', ... and so you should use "eq". The "=" operator assigns the strings to $choice.
About your belief - yes, the "last" command in the following form:
will immediately exit the loop specified by "LABEL". And, in your program, the control will go the first executable statement inside the topmost "do" loop.
That is, the "last RESPONSE1" will cause the control to go to the topmost "system('clear')" statement at line # 7.
I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome.
Unfortunately, I never found a... (1 Reply)
Hello,
I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file.
For example;-
In the script MENU.sh there are 10 options i want to design a script MENU2.sh that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Hi Team,
I have a requirement to login into URL using username and password , then I have to select a "particular name" from drop-down menu and then Read the values user records etc.... using perl.
Is it possible to do in perl script ? (OR) Can you please let me know which scripting... (1 Reply)
hi all i am a newbie to this
is there any examples on creating a main menu with 3 sub menu
main menu -> option a , b and c
a menu -> option 1 ,2 and 3
b menu -> option 1 ,2
c menu -> option 1 ,2
i am getting headache as my code kept getting unexpected EOF
---------- Post... (0 Replies)
Hopefully I'm in the right place. Im new to the forums and linux!
I'm looking to add a menu to my perl hangman game i have created. The menu will use user input for the desired option and then perform the operation indicated. I would like something along the lines of:
Welcome to Hangman... (1 Reply)
Problem:
I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
So, I need help writing a Menu script in UNIX.
First how can I use letters for the options instead of numbers?
Also, is there any templates out on the web I can use? (2 Replies)
I'm working on a script for a basic menu with four options. The first option for the menu asks a user to put in anyone's user name and is supposed to display the user's home directory. If a user does not enter a name, then their own home directory should be displayed. The second menu option is... (0 Replies)
It's me again :)
I would like to create a script that will display a 'Main Menu' which will link to other scripts in the same directory. Is it possible to have a scrolling menu and pretty colours for this? :) (9 Replies)