ホーム > Perl > Perlの$&

Perlの$&

ookawara@lx1:~$ cat a.pl
$s = "ABC";
$s =~ s/A//;
print "Match=$&\n";
$s = "BBC";
$s =~ s/A//;
print "Match=$&\n";
ookawara@lx1:~$ perl -f ./a.pl
Match=A
Match=A
そうなんだ・・・

このエントリーをはてなブックマークに追加
はてなブックマーク - Perlの$&
Share on Facebook
Bookmark this on Delicious
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip

カテゴリー: Perl タグ:
  1. コメントはまだありません。
  1. トラックバックはまだありません。