my $str = "a load of constant stuff..."; $str .= "optional bit in the middle " if $option; $str .= "loads more stuff";