On Wednesday, August 13, 2003 11:42, Rob Dixon wrote: > >Alan Perry wrote: >> <[EMAIL PROTECTED]> wrote: >> > I've been reading the previous post and was wondering about what qr does > >[snip] > >> For the second array item, the line translates to: >> print "found\n" if $str =~ '^from: [EMAIL PROTECTED]'mi >> Which could also be written as >> print "found\n" if $str =~ /^from: [EMAIL PROTECTED]/mi > >Except that using the single quote as a delimiter prevents >interpolation within the string. > > qr/^from: [EMAIL PROTECTED]/mi > >would try to expand an array called @hotmail and fail, whereas > > qr'^from: [EMAIL PROTECTED]'mi > >would be interpreted directly as a regex. Which is why I wrote >it that way.
Of course, you are right... Got too happy with the copy/paste feature. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]