文字列2
use strict; use warnings; use utf8; binmode STDIN, ':encoding(cp932)'; binmode STDOUT, ':encoding(cp932)'; binmode STDERR, ':encoding(cp932)'; my $i = "こんにちは!"; my $name = "世界\n"; #代入演算 $i.= $name; print $i; #繰り返し my ($str1, $str2); $str1 = "こんにちは!"; $str2 = $str1 x 3; print $str2;
C:\Perl\src>perl string2.pl こんにちは!世界 こんにちは!こんにちは!こんにちは!