2008-02-13 1.19 文字列の先頭または末尾の空白を削除する Perl Cookbook 読み込んだ文字列の先頭または末尾に空白文字が付加されている場合は、それらを削除したい。 $string =~ s/^\s+//; $string =~ s/\s+$//;