Hello,
in a script I can write:
if (
....
$subject =~ /phar/i or
$subject =~ /phfar/i or
$subject =~ /phhar/i or
$subject =~ /phya/i or
$subject =~ /photo/i
....
){..}
"or"
if (
....
$subject =~ /ph(ar|far|har|ya|oto)/i
....
){...}
"or"
if (
....
$subject =~ qr(ph(ar|far|har|ya|oto))i
....
){...}
I wonder which one of these forms is faster ?
About qr :
if I do :
$match = qr(ph(ar|far|har|ya|oto));
print ref $match, $/;
I get the output:
Regexp
What is $match exactly ?
Why I can bless $match ?
tia (I know perldoc perlop ...)
--
Gérard
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>