I am a newbie in perl and I need to produce a script in perl to work and achieve the following:

1) Look into the file /etc/defaultrouter , and store the value in it
2) If the value is a number, go to LIST and print out the second column corresponding to the value.(eg London)
3) If the content of /etc/defaultrouter is not a number then go to /etc/host to check for the corresponding number
4) Get the number in step 3 and execute step 2

Content of LIST

22.123.2.1.1 canada
192.11.2.1 india
177.235.1.1.1 spain
172.44.5.1 london
66.112.4.1 newyork


if anyone has done this before, kindly post it or if the gurus can help out.
Thanks
Ibroxy

Plz, I have a problems on how to connect a vb form to the Database!!

Plz ,I have a problem on how to connect VB to Mysql database

This is not tech support, we don't do peoples work for them unless they show some effort.

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.