- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Perl Question
- From: "Gonzalo Servat" <gservat@xxxxxxxxx>
- Date: Wed, 2 Apr 2008 01:26:49 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=F+A2iUNm9HkhpHqnjCzt2GiMKIx76odfL85IXGb9zrM=; b=P3o4kg77DCWBfxziPtRe51zPO9uHjLSTE7GEcPo1B6/VhyhDPtloUCf72wipdfAU9iD69beGh6d61GNooM+5HGyV4zfR2SwDA8lyTekPMZoR/8gWEgBgZSmGR+Je62eZdYmxcYzRcVBHh7lpKozF+S3G1dW4RL3XfxGG/EdS+bc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=rtm3UU10jGz3mpV/nmjeVw+HxDv6zZavrmRHRbQYrTS20cWoowKntz7H2HPwgqi7puULePCmXIVQFmjvxFHrYIz2KcOACWKZeRzNqAg/K9KZNdlsXbq1+ds0x9Y89NbuSNqHrl5z787oNiOnmIVSmlj0o3L56xUC2ZVH6lYS6wQ=
On Wed, Apr 2, 2008 at 1:09 AM, Peter Abbott <abbottp_c@xxxxxxxxxxxxxxxx>
wrote:
> [..snip..]
> if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
> \d).*?(\d*\.\d\d)L/) {
> $box = $1;
> $name = $2;
> $name =~ s/\.//;
> $place = $4;
> $time = $5;
> $margin = $6;
> }
> Undoubtedly something simple that a self taught dummy has failed to
> grasp.
>
Hi Peter,
I'm not too sure about this, but I believe when you do "$name =~", you're
effectively starting a new regular expression which means it clears $1, $2,
$3, $4, etc (unless you use brackets inside the new regular expression).
Maybe someone else can explain it better than me? :-)
HTH!
- Gonzalo