8. コメントと正規
表現
m{# tryingto cheat with cpants game ;)
use strict;
use warnings;
}x;
MONS/AnyEvent-SMTP-0.10/lib/AnyEvent/SMTP/Client.pm
78.
8. コメントと正規
表現入れ子がおかしくなる場合
$rest =~s{
b # start at word boundary
( # begin $1 {
$urls : # need resource and a colon
[$any] +? # followed by on or more
...
) # end $1 }
...
}{<A HREF="$1">$1</A>}igox;
AUTRIJUS/Pod-HtmlHelp-1.1/WinHtml.pm
79.
8. コメントと正規表
現次の文字がデリミタになるんじゃなかったの?
unless ($$this=~ s
# {use (warnings|strict)...)K}
{use warnings...)K}
{$begin_block}s)
{
die("Could not add a begin block.n");
}
WINTRU/Carrot-1.1.309/lib/Carrot/Modularity/Package/Source_Code.pm
80.
8. コメントと正規表
現どちらのコメント?
$regexp=qr{
....
# (?{
#my $pos=pos;
# my $prev=substr($str, $pos-10, 10);
# my $post=substr($str, $pos, 10);
# print "emitted at position ",pos,...;
# })
}xs;
OPI/HTML-YaTmpl-1.8/lib/HTML/YaTmpl/_parse.pm