ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-web
perl-win32-web
Re: Get 'document.referer' in perl?
by Chris Devers other posts by this author
Aug 31 2001 2:22PM messages near this date
view in the new Beta List Site
Get 'document.referer' in perl? | List Broken?
On Fri, 31 Aug 2001, Erik Andersson wrote:

>  There is a variable called 'document.referer' in java scripts. It
>  contains the refering url of the webpage which includes the java
>  script.
>  
>  Does anyone know if it is possible to access 'document.referer' from a
>  perl script, ie is it possible to get the refering url of the web page
>  containing a perl script (loading for instance as img src...)?
 
By default, it's part of your %ENV hash, stored as $ENV{HTTP_REFERER}.  
CGI.pm has builtin methods for accessing it -- if you've created a CGI
object as $q, then it's $q-> referer(). Generating a dump of the %ENV hash
will give you a list of the others you have access to -- generally 20 or
so properties for any given web transaction.
 


-- 
Chris Devers                     chris_devers@[...].com

_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
Thread:
Erik Andersson
Chris Devers

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved