the most reliable and correct method to get network interface address in Linux using Perl


/ Published in: Perl
Save to your folder(s)

This method doesn't rely on parsing 'ifconfig' tool output, and should work in any Linux distribution, but also could work in other POSIX environments.
The function returns a string with IPv4 address or 'undef' if it's not possible.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.