Update: Put $page through two passes of string interpolation.
$galleryname = galleryname(); $page = eval "qq{$page}";
It struck me right away that your $var placeholders are just begging to be interpolated.
If gallery() returns 'the Rijksmuseum' and $page is 'Welcome to $gallery!', then eval will see qq{Welcome to $gallery} and $page will get 'Welcome to the Rijksmuseum!'
In reply to Re: Regex to replace $vars with subroutine
by Narveson
in thread Regex to replace $vars with subroutine
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |