my $input = 'hello'; my $temp = 'world'; $input = "$input $temp"; #### my $input = 'hello'; my $temp = 'world'; $input = $input . ' ' . $temp; #### my $input = 'hello'; my $temp = 'world'; $input .= ' ' . $temp; #### my $input = 'hello'; my $temp = 'world'; $input = join(' ', $input,$temp); #### my $input = 'hello'; my $temp = 'world'; my @temp = split('', $input); push @temp, ' '; push @temp, $_ for split('', $temp); $input = join('',@temp);