On Wed, 16 May 2001, Liger-dc wrote:

> are the variables $1 and $2 special variables? and if
> so what do they do?

Yes, they refer to parenthesised expressions in a regular expression:

/(.*):(\d)/

$1 would be whatever matched .*
$2 would be whatever matched \d

Please see the perlre documentation via perldoc for more information on
backreferences.

-- Brett

Reply via email to