473,403 Members | 2,354 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,403 software developers and data experts.

Passing data from a HTML form to perl script

1
Hi All,

I am relatively new to HTML and perl scripts. I am writing a HTML page which has a form. It takes two inputs. Now I want pass these two inputs from the HTML form to the perl script. I want to use these two inputs to open specific files and diff them using the perl script. Can any one please help me?

Expand|Select|Wrap|Line Numbers
  1. HTML:
  2.  
  3. <form name="compare" action= "Diff.pl" method="post">
  4. <table align="center">
  5. First:<input type="text" name="first" value="0" size ="3" maxlength="2"/>
  6. Second:<input type="text" name="second" value="1" size ="3"maxlength="2" />
  7. <input type="SUBMIT" WIDTH=10 VALUE="GO" />
  8. </table> 
  9. </form> 
  10.  
  11. PERL File:
  12. #!/usr/bin/perl
  13.  
  14. $I1 = shift;
  15. $I2 = shift;
  16.  
  17. system ("diff \\SomeLocation\folder_$I1/File_$I1.txt \\SomeLocation\folder_$I2/File_$I2.txt ");
  18. unlink (" \\SomeLocation\folder_$I1/File_$I1.txt ");
  19. unlink (" \\SomeLocation\folder_$I2/File_$I2.txt ");
  20.  
  21.  
Looking forward to some solution. Thanks.
May 6 '10 #1
1 2798
RonB
589 Expert Mod 512MB
Start by reading the documentation for the CGI module.
http://search.cpan.org/~lds/CGI.pm-3.49/lib/CGI.pm
May 6 '10 #2

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

Similar topics

9
by: google_nospam | last post by:
Thanks in advance for any help. I'm looking for a way to pass data from php to perl. Basically, I want to take some dynamic data from a database, mixed with user input, then reformat it to make a...
1
by: Ross McLoughlin | last post by:
Hey all, Is it possible to pass a html form to a vb component, where it can be further processed? Thanks Ross
1
by: Joe Ray | last post by:
I am interested in passing encrypted HTML form data to a JSP page where it is than decrypted. Can someone suggest a technique to do this and the technology or encryption method I should use. If you...
1
by: pragatid | last post by:
Hi, I am new to Perl programming. Let me explain my requirement over here. I have a Perl script located in /usr/sbin/ say script A and I want to invoke this script via web after accepting some user...
0
by: Sebarry | last post by:
Hi, I have the following actionscript that invokes a PHP script. var articlesToRetrieve = 5; var currentIndex = 0; varSenderTitles = new LoadVars();
5
by: veeraiah | last post by:
Hi, I am new to PERL Scripting, i need your help with one of the problem i am having. I am having a PERL Script which has two variables $CurMon and $PriorMon. a Windows batch script calls this...
66
by: happyse27 | last post by:
Hi All, my html code is sno 1) and perl code is sno 2). a) I tried to print $filename and it cant print out the value, only blank was displayed, and the file could not be uploaded. And it...
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: jdluk87 | last post by:
Hi to everyone, I have a problem with a simple html form that send simple data to my perl script, i remember, but i'm not sure, that without fastcgi this working fine, but with fastcgi nothing to do....
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.