On Apr 16, Nikola Janceski said:

>Yes.... but only if you are looking for that pattern.. if you wanted to add
>something like "sedan" then you need to use // but the qr would speed up the
>compile when using a $var in the //;
>
>if($element =~ $lookfor) { ## works if $lookfor = qr/car/; the same as
>$element =~ /car/
>
>if($element =~ /sedan $lookfor/) { ## works faster if $lookfor = qr/car/;
>than if $lookfor = "car";

Sadly, that's misinformation.  If the group would like, I can write a post
explaining the PURPOSE and APPLICATION of qr// in code.  After reading it,
you should have a good grasp of when qr// gives speed benefits.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to