#!/usr/bin/perl use strict; use warnings; my $string1 = "Hello"; my $string2 = " World"; substr($string1,-1,0,"$string2"); print "$string1\n";