in reply to Inserting in an unknown point

$string=~s/(/FOREIGN KEY (/ will insert it before the first open bracket (which happens to be the right place in this case, but may not in others...)

--
Tommy
Too stupid to live.
Too stubborn to die.