diff --git a/lib/net.pm b/lib/net.pm index 04bce9b..c08a2e8 100644 --- a/lib/net.pm +++ b/lib/net.pm @@ -192,7 +192,7 @@ sub net_update { open(IN, "/proc/net/dev"); while() { my ($dev, $data) = split(':', $_); - if($dev =~ /$nl[$n]/) { + if(trim($dev) eq /$nl[$n]/) { ($net_bytes_in[$n], $net_packs_in[$n], $net_error_in[$n], undef, undef, undef, undef, undef, $net_bytes_out[$n], $net_packs_out[$n], $net_error_out[$n]) = split(' ', $data); last; }