Perlfect Solutions
 

[Perlfect-search] excluding file@ directories

Daniel Naber daniel.naber@t-online.de
Tue, 9 Jan 2001 15:08:31 +0100
On 2001-01-09 03:19, you wrote:

> (but perhaps someone can explain something to me? ive been trying to
> see where the problem might be and there's a quotemeta step in the
> loading of the exclusions file which seems redundant to me since the
> exclusion strings are interpolated rather than evaluated later on.
> perhaps that's it?)

I'm not sure what you mean - but these strings are used in a regular 
expression, and for that special characters have to be escaped. You can 
test it like this. If you remove the \ in front of $blubb in $bla, it 
won't work anymore, i.e. '$blubb' wil be found anymore.

#!/usr/bin/perl

$bla = '\$blubb';
$str = 'laber $blubb bla';

$str =~ m/($bla)/;
print "$str ---- $1\n";

regards
 Daniel

-- 
Daniel Naber, Paul-Gerhardt-Str. 2, 33332 Guetersloh, Germany
Tel. 05241-59371, Mobil 0170-4819674