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 192.168.9.23 and the script will attempt to validate the IP Address 192.168.9.23.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.