$string .= "someoutput"; $string .= "someotheroutput"; # logic here $string .= "moreoutput"; print $string;