文字列を扱ってみよう
#05 文字列を扱ってみよう
簡易的なプログラムを作成。
#word.pl use strict; use warnings; my $name = "tom"; my $s = "he\tllo, $name \n"; my $b = 'hel\tlo'; print $s; print "hello" x 5;
he llo, tom
hellohellohellohellohello
と表示されることを確認。
※文字列を繰り返す際は「x 数字」
- \n 改行
- \t Tab