I faced this just a couple of days ago on a FreeBSD system for em0. Here's what I did:
($in, $myip, $rest) = split / /,qx/ifconfig|grep 192.168/; print "This IP is $myip\n"; I used the FreeBSD "ifconfig" system call and parsed the output with split. Whatever system you're on will probably have some other systemly way to find this information. -Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 6:41 AM To: [EMAIL PROTECTED] Subject: finding out my IP address.. Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY! Kev -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]