473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How do i Call Perl script from HTML

rajiv07
141 100+
Hi to All,

I have try to execute a perl script in html.But nothing get display

What i have tried so for is

The referrer.pl
---------------
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use CGI;
  3.  
  4. my $cReferrer=$ENV{'REFERER'};
  5.  
  6.  
  7. print "Content-type:text/html\n\n";
  8.  
  9. print "$cReferrer";
  10.  
Html File

[HTML]<HTML>
<HEAD>
<TITLE> CHECK </TITLE>
</HEAD>

<BODY>
<script language="JavaScript" type="text/javascript">
src="/cgi-bin/query/referrer.pl";
</script>
</BODY>
</HTML>
[/HTML]

Please Let Me know if anything that i have to change in the code.

Thanks

Regards
Rajiv
Dec 26 '07 #1
1 3050
KevinADC
4,059 Expert 2GB
Hi to All,

I have try to execute a perl script in html.But nothing get display

What i have tried so for is

The referrer.pl
---------------
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use CGI;
  3.  
  4. my $cReferrer=$ENV{'REFERER'};
  5.  
  6.  
  7. print "Content-type:text/html\n\n";
  8.  
  9. print "$cReferrer";
  10.  
Html File

[HTML]<HTML>
<HEAD>
<TITLE> CHECK </TITLE>
</HEAD>

<BODY>
<script language="JavaScript" type="text/javascript">
src="/cgi-bin/query/referrer.pl";
</script>
</BODY>
</HTML>
[/HTML]

Please Let Me know if anything that i have to change in the code.

Thanks

Regards
Rajiv
Try just running the script directly from the URL:


Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use CGI::Carp qw/fatalsToBroswer;
  5. print "Content-type:text/html\n\n$ENV{'REFERER'};"
  6.  
if that works then it should work as you have it in your html code. If it does not work it's either a permissions problem or you might need to upload the perl script in ASCII (text) mode, not binary mode.
Dec 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: sam | last post by:
I have a function writen in Perl that takes a name-value list (array) as argument and returns a name-value list (array). My question is: How to call this function from PHP and get the returned...
7
by: Danny | last post by:
Newbie here Thanks for the help with this command: print "Status: 204 No Content\n\n"; which returns nothing in a perl script. This is great because I just want my perl script to increment a...
7
by: Wladimir Borsov | last post by:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click...
8
by: jonniethecodeprince | last post by:
Hello all. I need to get a html page to work with a PERL script <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"...
22
by: owlice | last post by:
Greetings! I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
82
by: happyse27 | last post by:
Hi All, I modified the user registration script, but not sure how to make it check for each variable in terms of preventing junk registration and invalid characters? Two codes below : a)...
3
by: happyse27 | last post by:
Hi All, I am creating the perl script using html form(with embedded javascript inside). When using this html form with javascript alone, it works where the form validation will pop up...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.