Just check if the values are defined before printing them. I don't have a linux system so I don't know why IO::Interface (which does't compile for me on Windows/Strawberry) doesn't return a dstaddr or hwaddr.
printf "dstaddr = %s\n", defined($if->dstaddr) ? $if->dstaddr : ''; +# line 15 printf "hwaddr = %s\n", defined($if->hwaddr) ? $if->hwaddr : ''; # +line 16
In reply to Re^3: Read network configuration on FreeBSD
by VinsWorldcom
in thread Read network configuration on FreeBSD
by josef
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |