in reply to Re: Re: Efficiency Question
in thread Efficiency Question
my $skip = join ('|', map {quotemeta} keys %$config_dirs);This will look something like "/usr/bin|/home|/var" or what have you. Now you can just go and check against this, like dragonchild suggested, but with a slight mod:
Presumably if the value of $skip does not change within your program, you can use the /o option to only "compile once" your regular expression.foreach (keys %$dirs) { next if /^($skip)/; # Do stuff }
|
|---|