2006-09-24から1日間の記事一覧
15.1 indexを使って部分文字列を探す。 #!/usr/bin/perluse warnings; use strict;# 文字列"Howdy world!"からwが初めて出てくる位置を検索 my $shuff="Howdy world!"; my $where1=index($shuff,"w"); print "$where1\n";# 文字列"Howdy world!"から2回目の…
15.1 indexを使って部分文字列を探す。 #!/usr/bin/perluse warnings; use strict;# 文字列"Howdy world!"からwが初めて出てくる位置を検索 my $shuff="Howdy world!"; my $where1=index($shuff,"w"); print "$where1\n";# 文字列"Howdy world!"から2回目の…