PrimeLord has asked for the wisdom of the Perl Monks concerning the following question:
use strict; my ($config_dirs) = &read_conf(); my ($dirs) = &search_dirs(); &print(); sub read_conf { my %config_dirs; .... # read the conf file return \%config_dirs; } sub search_dirs { my %dirs; .... # search the dirs return \%dirs; } sub print { foreach (keys %$dirs) { my $no_print = 0; foreach my $skip (keys %$config_dirs) { if (/^$skip/) { $no_print = 1; last; } } print REPORT "$_\n" unless ($no_print == 1); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Efficiency Question
by dragonchild (Archbishop) on Mar 21, 2002 at 19:33 UTC | |
by PrimeLord (Pilgrim) on Mar 21, 2002 at 19:37 UTC | |
by tadman (Prior) on Mar 21, 2002 at 20:33 UTC | |
by CukiMnstr (Deacon) on Mar 21, 2002 at 21:00 UTC | |
|
Re: Efficiency Question
by vladb (Vicar) on Mar 21, 2002 at 20:16 UTC |