% my $page = uri_unescape($p) || $ENV{REDIRECT_URL}; You were looking for <% $page %> and the server can't find it.