summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-21 06:59:20 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-21 06:59:20 +0000
commiteadbe480a2959183f72c636aa5bbabd4de070b7b (patch)
treefa179c4a0098781376354ee5cd06aac83beb9421
parent0abf5591e34c88cfb9d13b13428f815c150c8f33 (diff)
downloaddrakx-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_applet6
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 {