Assuming you wish to pass the URL from a CGI script to the next page:
use CGI;
...
$query->hidden('URL',$query->self_url);
...
Assuming you wish to pass the URL from the web page to the CGI.
- on your page create a hidden field that contains the pertinent information
- use the param() function in CGI to retrieve the variable and voila!
In the future, please be more specific in your question and post them to
Seekers of Perl Wisdom instead.