Concatenate strings : Concatenate « String « Perl






Concatenate strings

   

#!/usr/bin/perl
use warnings;
use strict;

my $First = "One ";
my $First_Addition = "Two ";
my $Second_Addition = "Three";
my $string = $First;
print "The string is now: $string \n";
$string.= $First_Addition;
print "The string is now: $string \n";
$string.= $Second_Addition;
print "The string is now: $string \n";

   
    
    
  








Related examples in the same category

1.Concatenate string
2.Concatenate the separate strings
3.Concatenate two string value in print statement
4.Concatenate two strings
5.String concatenate operator
6.Read input lines and concatenate them.
7.Combine string concatenation operator and string multiplication operator