in reply to How can I pass the URL of the page I am on?

...and if you can't use forms then:
use URI::Escape; my $url = $query->self_url; $url = uri_escape($url); # or $query->url; it depends.. print qq{<a href="/path/to/new/location.pl?URL=$url">new location</a>} +;

Replies are listed 'Best First'.
RE: Answer: How can I pass the URL of the page I am on?
by merlyn (Sage) on Oct 10, 2000 at 22:19 UTC
    The result of self_url is already URI-escaped, but if you're feeding it as HTML, you need to additionally HTML-entitize it.
    use HTML::Entities; my $url = encode_entities(CGI->self_url()); print qq{<a href="/path/to/new/location.pl?URL=$url">new location</a>} +;

    -- Randal L. Schwartz, Perl hacker