in reply to Efficiency Question
The second is (as far as I can tell) identical to your code. The first assumes that the entries in $config_dirs is string-wise equal to the entries in $dirs. YMMVforeach (keys %$dirs) { next if $config_dirs->{$skip}; # Do stuff } ---- Or ---- foreach (keys %$dirs) { next if grep {/^$skip/} keys %$config_dirs; # Do stuff }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Efficiency Question
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 |