in reply to newbie quoting question

As George_Sherston mentioned above, the parentheses put a banana into $1. Here is just another way to circumvent that:
$var = quotemeta('apple (banana) cherry'); $line = 'apple (banana) cherry kiwi lemon melon'; $line =~ s/$var//;
That would be equal to:
$var = 'apple \\(banana\\) cherry'; $line = 'apple (banana) cherry kiwi lemon melon'; $line =~ s/$var//;
Thus perl wouldn't catch the banana, because the parentheses were escaped.
-- 
arneb@emergency:~ > perl -MO=Deparse -e "(0); #Confusing perl..." 2> /dev/null
'???';
arneb@emergency:~ >