|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Sys::IPby idnopheq (Chaplain) |
| on Apr 04, 2001 at 14:32 UTC ( #69609=note: print w/ replies, xml ) | Need Help?? |
|
I tested this on a RedHat 7 box w/ 5.6.0. It failed with Undefined subroutine &Sys::IP::SUPPORTED called at /usr/lib/perl5/site_perl/5.6.0/Sys/IP.pm line 27. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.0/Sys/IP.pm line 28. Compilation failed in require at ./getip.pl line 5. BEGIN failed--compilation aborted at ./getip.pl line 5. I think the BEGIN block doesn't like looking for a sub not included in the block. So, I tested my theory with the following adjustment:
I've been up all night, so this could be made better, but it works. Here is my test code:
BTW, MSWin32 uses 'ipconfig /all' for the type of data you need. I think it sits in %SystemRoot%/system32 on NT/2k and %SystemRoot%/command on 98/ME, but I could be wrong. By default, if networking is installed, ipconfig should reside in the PATH env var. I'll check it for you when I get in to work.
HTH
In Section
Code Catacombs
|
|
||||||||||||||||||||||