Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How can I pass the URL of the page I am on?

by mendeepak (Scribe)
on Mar 08, 2012 at 12:08 UTC ( [id://958461] : note . print w/replies, xml ) Need Help??


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.