perldoc perlvar
......
$& The string matched by the last successful pattern match (not
counting any matches hidden within a BLOCK or "eval()" enclosed
by the current BLOCK).
The use of this variable anywhere in a program imposes a
considerable performance penalty on all regular expression
matches. To avoid this penalty, you can extract the same
substring by using "@-". Starting with Perl 5.10, you can use
the "/p" match flag and the "${^MATCH}" variable to do the same
thing for particular match operations.
This variable is read-only and dynamically-scoped.
Mnemonic: like "&" in some editors.作者: grshrd49 时间: 2013-05-27 10:51 本帖最后由 grshrd49 于 2013-05-27 10:52 编辑