In a message dated 3/9/2004 3:08:10 PM Eastern Standard Time, 
[EMAIL PROTECTED] writes:
>Careful, I believe we want the above capture anchored to the start of
>the line, though I prefer the direct match approach...

You're right about the anchor, but direct match wouldn't be the preferable 
method here. Say, using your code, my $variable = 1338. The regex is true, even 
though the number will be different.You'd have to do /^$variable\s+/ (even 
then, $variable could be "13384 R", be true, and mess things up). Regex in 
conditionals can be effy and ambiguous, and if they can be avoided, why not avoid 
them. 

-will
(the above message is double rot13 encoded for security reasons)

Most Useful Perl Modules
-strict
-warnings
-Devel::DProf
-Benchmark
-B::Deparse
-Data::Dumper
-Clone (a Godsend)
-Perl::Tidy
-Beautifier

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to