ForNext
Only Do What Only You Can Do
054. concatenate
Hyperpolyglot Interpreted Languages: PHP, Perl, Python, Ruby より (2012.05.08)
VBScript
JScript
Perl
my $s = "Hello, "; my $s2 = $s . "World!";
PHP
$s = "Hello, "; $s2 = $s . "World!";
Python
s = 'Hello, ' s2 = s + 'World!' juxtaposition can be used to concatenate literals: s2 = 'Hello, ' "World!"
Ruby
s = "Hello, " s2 = s + "World!" juxtaposition can be used to concatenate literals: s2 ="Hello, " 'World!'