perl 文字列処理関数 length

#lengthのテスト

print "文字列を入力してください>";
$string = <STDIN>;
chomp($string);

#長さを調べる
print "文字列の長さ:", length($string), "\n";

#実行結果
# 文字列を入力してください>perl is a practical extraction and report language
# 文字列の長さ:50

初めてのPerl 第6版

初めてのPerl 第6版