Hello,
I am trying to use a PERL script to get the IP addy assigned to my box Via DHCP. I have a Nix box set up as a gateway/router right before my broadband connection. I would like to be able to SSH into this box at any time, from anywhere, but my ISP gives me a dynamic IP assigned through DHCP. I am trying to find a way to create a PERL script that will find the assigned IP of this box, throw it in a text file, and upload it to an FTP server. I just dont know how to find out the IP using PERL. I am thinking of parsing the assigned IP out of the DHCPcd logs or some thing similar. Is there an easier way to do this? If so, what is it? If there isn't, how would i go about making PERL check these logs when ever there is activity, to find out if there was a change in the IP? Thanx for any input on this problem in advance guys. By the way, i am a totally new to PERL, but an working on learning it as part of this project.
Thanks
--a2K