- or download this
$str = 'Nothing but perl can parse Perl';
...
print($str =~ /perl/i ?1:0,"\n"); # Prints '1'
print($str =~ /noth/i ?1:0,"\n"); # Prints '1'
- or download this
$str = 'Nothing but perl can parse Perl';
...
while (/perl/i) {
# Loops forever
}
- or download this
my @matches = ($g ? /$re/g : /$re/);
- or download this
for (...) {
my ($re, $g) = @$_;
my @matches = ($g ? /$re/g : /$re/);
...
}
- or download this
>perl -le"print qr/.../s"
(?s-xim:...)