Content deleted Content added
m WP:CHECKWIKI error 26 + genfixes using AWB (7165) |
Improve consistency and make minor typographic corrections |
||
Line 18:
== Examples ==
Unless otherwise indicated, the following examples conform to the [[Perl]] programming language, release 5.8.8, January 31, 2006. This means
The syntax and conventions used in these examples coincide with that of other programming environments as well (e.g., see Java in a Nutshell — Page 213, Python Scripting for Computational Science — Page 320, Programming PHP — Page 106
<table class="wikitable">
Line 51:
print "We matched '$1' and '$2'\n";
}
</pre>'''Output:'''<pre>
We matched 'Hel' and 'o W';
Line 87 ⟶ 86:
<tr>
<td>?</td>
<td>Modifies the *, +, or {M,N}'d
to match as few times as possible.</td>
<td align="left">
Line 159 ⟶ 158:
if ($string1 =~ m/llo\b/) {
print "There is a word that ends with 'llo'\n";
}
</pre></td>
Line 226 ⟶ 223:
print "$1 is the first number in '$string1'\n";
}
</pre>'''Output:'''<pre>
99 is the first number in '99 bottles of beer on the wall.'
Line 285 ⟶ 281:
<tr>
<td>\z</td>
<td>Matches the end of a string (but not an internal line).<br/> see Perl Best Practices — Page 240</td>
<td align="left">
<pre>
|