For your desired result, you should use the structure as written above. The idea is that the networkInfo() subroutine returns a list, which you iterate over. For every entry in that list, you want to perform your tests. Examining your output, I note blank entries in your output for $nic->{ip}, $nic->{mask} and $nic->{bcast}. This means the bug is where you assign those values in the networkInfo() subroutine.
In reply to Re: Need help with small IF statement
by kennethk
in thread Need help with small IF statement
by MikeDexter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |