in reply to Regex with condition

I can't test right now on my mobile device, but something like this should presumablly work:
while (my $line = <$IN> ) { $line =~ s/Weiß/Schwarz/g if /\sb\s/ .. (not /\sb\s/);