Hello Gary, > [gary@gary gary]$ cat t > #!/usr/bin/perl -w > > my @input=('one','two','three'); > my @blacklist=('two','four'); > > foreach $line (@input) { > foreach $cond (@blacklist) { > print "$line=$cond..."; > if ($line=~/$cond/) { > print "true\n"; > last; > } > print "false\n"; > } > } > [gary@gary gary]$
This comes very close. But it doesn't seem to find *any* occurence of the searched string. Only those that stand 'alone'. How do I match these (assuming the string to find ist 'test')? ldjtestödsfllöf ^^^^ test jsdfkjsh test sldflösdfk lödskföldtest ^^^^ testösldfkdlfk which actually means *any* line containing the string 'test'... I tried /.+test.+/ so far, but it doesn't seem to work here... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]