sub findandreplace{ my($string,$find,$replace); $string=~s/$find/$replace/g; $string; }