diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-11 14:51:43 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-11 14:51:43 +0000 |
commit | 8d62898c2bbb8d9039430f689a1387e2e201be0d (patch) | |
tree | 798733407b79030dd6fa348f7b902db6f0cc1097 /perl-install/standalone/drakroam | |
parent | e560f277e840a949e7c9535bb293b658e5a92d95 (diff) | |
download | drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar.gz drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar.bz2 drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.tar.xz drakx-backup-do-not-use-8d62898c2bbb8d9039430f689a1387e2e201be0d.zip |
use each_index
Diffstat (limited to 'perl-install/standalone/drakroam')
-rwxr-xr-x | perl-install/standalone/drakroam | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam index eab863caf..00a66425f 100755 --- a/perl-install/standalone/drakroam +++ b/perl-install/standalone/drakroam @@ -57,9 +57,7 @@ my %available_roaming_daemons = ( }, read_config => sub { my ($config) = @_; - my $line = 0; - foreach (cat_($config)) { - $line++; + each_index { if (/^#/) {} #ignore comments elsif (/^\n/) {} #ignore blank lines elsif (/([^ \t]+)([ \t]+)(.*)/) { @@ -80,8 +78,8 @@ my %available_roaming_daemons = ( else { $dhcp = 0 } &AddNet($essid, $mode, $channel, $key, $dhcp); } - else { die "Line $line of configuration file is not parseable.\n" } - } + else { die "Line $::i of configuration file is not parseable.\n" } + } cat_($config) }, write_config => sub { my ($config) = @_; |