Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Perl

Idiom #153 Concatenate string with integer

Create the string t as the concatenation of the string s and the integer i.

my $t = "$s$i";

Using string interpolation
my $t = $s . $i;

Using concatenation
t : String := s & Integer'Image (i);

New implementation...
< >
programming-idioms.org