From: kapil v < aaaaax2003%40yahoo.com">aaaaax2003
yahoo.com>
> What is the difference between these two expressions?
>
> $pat=qr/some_regex/;
> How is /{$pat}xxx/ and /$xxx/ different?
Try that!
The first one would look for an opening curly brace followed by
whatever the some_regex matches followed by closing curly and 'xxx',
the second would match whatever some_regex matches followed by 'xxx'.
You should keep in mind that $variable and ${variable} means exactly
the same and that {} is only special in a regexp if it contains a
number, number and a comma, comma and a number or two numbers
separated by commas. (In which case if specifies the exact, maximum,
minimum and range of occurences of the item preceding the openning
curly.
Jenda
===== Jenda%40Krynicky.cz">Jenda
Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
.