📄 程嶏清单7-17.txt
字号:
$x = 'Perl is free.';
$y = 'ManagerWare costs $99.95.';
foreach ($x, $y) {
/^(\w+) (?:is|(costs)) (?(2)(\$\d+)|\w+)/; # Either (\$\d+) or \w+
if ($3) {
print "$1 costs money.\n"; # ManagerWare costs money.
} else {
print "$1 doesn't cost money.\n"; # Perl doesn't cost money.
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -