unless you want to create a global variable ,you ought to use my to identify the variable scoping.
the loop structure of perl is similar as most programming language.
while( condition ){...}
until( condition ){...}
for($k=0;$k<=$max;$k++){...}
foreachmy$key(keys %hash){print"the $key corresponding to $hash{$key}\n";}
regular expression
. a single character
\s a whitespace character (space, tab, newline, ...)
\S non-whitespace character
\d a digit (0-9)
\D a non-digit
\w a word character (a-z, A-Z, 0-9, _)
\W a non-word character
[aeiou] matches a single character in the given set
[^aeiou] matches a single character outside the givenset
(foo|bar|baz) matches any of the alternatives specified^ start of string
$ end of string
* zero or more of the previous thing
+ one or more of the previous thing
? zero or one of the previous thing
{k} matches exactly k of the previous thing
{k1,k2} matches between k1 and k2 of the previous thing
{k1,} matches k1 or more of the previous thing
HTML第二課:塊級元素塊級元素塊級元素 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang"zh-CN">
<head><meta http-equiv"Content-…