diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-06-21 06:59:20 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-06-21 06:59:20 +0000 |
commit | eadbe480a2959183f72c636aa5bbabd4de070b7b (patch) | |
tree | fa179c4a0098781376354ee5cd06aac83beb9421 | |
parent | 0abf5591e34c88cfb9d13b13428f815c150c8f33 (diff) | |
download | drakx-eadbe480a2959183f72c636aa5bbabd4de070b7b.tar drakx-eadbe480a2959183f72c636aa5bbabd4de070b7b.tar.gz drakx-eadbe480a2959183f72c636aa5bbabd4de070b7b.tar.bz2 drakx-eadbe480a2959183f72c636aa5bbabd4de070b7b.tar.xz drakx-eadbe480a2959183f72c636aa5bbabd4de070b7b.zip |
(getIP) simplify
-rw-r--r-- | perl-install/standalone/net_applet | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 34786234e..685a90c05 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -111,11 +111,7 @@ sub getIP { my @ip; my $ifconfig = '/sbin/ifconfig'; my @lines = qx|$ifconfig $interface|; - foreach(@lines){ - if(/inet adr:([\d.]+)/){ - push @ip, $1; - } - } + my @ip = map { if_(/inet adr:([\d.]+)/, $1) } @lines; return wantarray() ? @ip : $ip[0]; } sub cronNetwork { |