Thread: Perl Var to Jscript Var
Results 1 to 5 of 5
Related
-
Perl Help Forum: CGI Perl Forum
Replies: 1 -
How can i execute a perl file within perl programming... Forum: CGI Perl Forum
Replies: 1 -
How to post a variable from HTML to perl and from perl to HTML Forum: CGI Perl Forum
Replies: 1 -
How to post a variable from HTML to perl and from perl to HTML Forum: Website Scripts Forum
Replies: 0
-
10-02-2007, 08:21 AM #1
Perl Var to Jscript Var
oh dear - first post.
I was trying to ask about a problem... however with it being a problem involving perl/cgi and a url... your system wont let me post it.
WOW how useful is that......
So what do you want me to do? post 5 completely random posts just so I can pose my problem?
-
10-02-2007, 08:11 PM #2
Re: Perl Var to Jscript Var
Post the URL without a hyperlink, or else post the source code for the page. And of course, you'll want to post your problem statement as well.
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
-
10-08-2007, 03:50 AM #3
Re: Perl Var to Jscript Var
The problem I have is I am trying to pass a variable from Perl to be able to use it in Javascript. In this case the remote IP address but that is incidental.Up to now I have a perl script in my cgi-bin called ip the code in the file is:
Code:#!/usr/bin/perl -wTuse strict;use CGI;print CGI::header('text/text');print qq/var IP="$ENV{'REMOTE_ADDR'}"/;
-
10-08-2007, 11:50 AM #4
Re: Perl Var to Jscript Var
You need to escape special characters with a backslash, so instead of this:
Code:#!/usr/bin/perl -wTuse strict; use CGI; print CGI::header('text/text'); print qq/var IP="$ENV{'REMOTE_ADDR'}"/;
Code:#!/usr/bin/perl -wTuse strict; use CGI; print CGI::header('text/text'); print qq/var IP=\"$ENV{'REMOTE_ADDR'}\"/;
Music Around The World - Collecting tips, trade
and want lists, album reviews, & more
-
10-09-2007, 06:02 AM #5
Re: Perl Var to Jscript Var
That didn't seem to have any effect. Thanks for the reply though - perhaps getting a little nearer.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum