「Perl」文字列の連結のサンプル

環境
Perl v5.32.1
Windows10 64bit
書式
print 文字列1.文字列2
連結する場合は文字列と文字列をドット(.)で結びます。
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
use strict;
use warnings;
use utf8;
binmode STDIN, ':encoding(cp932)';
binmode STDOUT, ':encoding(cp932)';
binmode STDERR, ':encoding(cp932)';
print "テスト"."太郎";
use strict; use warnings; use utf8; binmode STDIN, ':encoding(cp932)'; binmode STDOUT, ':encoding(cp932)'; binmode STDERR, ':encoding(cp932)'; print "テスト"."太郎";
use strict;
use warnings;
use utf8;
binmode STDIN, ':encoding(cp932)';
binmode STDOUT, ':encoding(cp932)';
binmode STDERR, ':encoding(cp932)';

print "テスト"."太郎";

実行結果
>perl 11.pl
テスト太郎

Perl

Posted by arkgame