in reply to substr pattern matching

Having a hard time understanding exactly what you mean so I'm going to make a big assumption here. I'm thinking that you have a string 'Billiard' and you want to change that to 'Bill':
if ($line =~ /$partialword/i) { # I'm assuming $partialword is 'Bill'... $line =~ s/Billiard/Bill/; }
-- vek --