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

if you want current browser url you can use print $ENV{'HTTP_REFERER'} and if you want to get the current files server path use

print $0

Replies are listed 'Best First'.
Re: Answer: How can I pass the URL of the page I am on?
by marto (Cardinal) on Mar 08, 2012 at 12:36 UTC

    "if you want current browser url you can use print $ENV{'HTTP_REFERER'}"

    This isn't correct. HTTP Referer tells the URL of the previous page, not the current URL. Further reading: HTTP_referer.