I am having trouble getting this script started, if anyone has any ideas fell free to comment, i am new to perl script writing and am finding this one a bit difficult:

i need a Perl program which will check whether or not an IP Address entered by a user is in fact a valid one. The user is to enter the IP Address AS A COMMAND LINE PARAMETER eg the user will type check_ip.pl and the script will attempt to validate the IP Address

The script must first check whether the user has input any data at all and if not display an appropriate error message.

A valid IP Address must have:

  • 4 octets, each separated by “.

· numbers in each of the 4 octets (ie no alphabetic or
punctuation characters are allowed within each octet)

  • have the first octet between 1 and 255
  • have the 2nd, 3rd & 4th octets between 0 and 255

Only one IP Address is to be input and validated (ie there is no looping through several IP Addresses)

menu for a network engineer.

i need a Perl script that would be useful for a network engineer. This script will display the following menu

Networking Tools

1. Show me the IP address of this PC
2. Show me the subnet mask of this PC
3. Show me the computer name of this PC
4. Quit

Please type your selection :

The user will type in their selection (1 – 4) and the script will keep running until the user types in 4. An error message will be given if the user inputs anything other than 1 to 4.

Example : if user selects “1

If the user selects 1, the script will clear the screen and then display the following information on the screen :

“The IP address of this PC is <nnn.nnn.nnn.nnn>
Press any key to continue

replacing the <nnn.nnn.nnn.nnn> address with the ACTUAL IP address of the PC

The message “The IP address .. will remain on the screen until the uses presses any key, at which time the menu will be re-displayed.

10 Years
Discussion Span
Last Post by KevinADC

This so smells of class work. You need to put some effort into it if you want help with class work, that means writing some code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.