> What is the difference between these two expressions?
>
> $pat=qr/some_regex/;
> How is /{$pat}xxx/ and /${pat}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@... === 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

> What is the difference between these two expressions?
>
> $pat=qr/some_regex/;
> How is /{$pat}xxx/ and /${pat}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@... === 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