Jeremy Kister wrote:
> perldoc -q quote talks about \Q before a regex to escape special
> characters.
>
> how do you use \Q when you want to anchor the regex with a dollar sign ?
>
>
> my $string = my $regex = "foo";
> print "match\n" if($string =~ /^\Q${regex}$/);
print "match\n" if $string =~ /^\Q$regex\E$/;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>