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?
Looking forward to some solution. Thanks.
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?
Code:
HTML:
<form name="compare" action= "Diff.pl" method="post">
<table align="center">
First:<input type="text" name="first" value="0" size ="3" maxlength="2"/>
Second:<input type="text" name="second" value="1" size ="3"maxlength="2" />
<input type="SUBMIT" WIDTH=10 VALUE="GO" />
</table>
</form>
PERL File:
#!/usr/bin/perl
$I1 = shift;
$I2 = shift;
system ("diff \\SomeLocation\folder_$I1/File_$I1.txt \\SomeLocation\folder_$I2/File_$I2.txt ");
unlink (" \\SomeLocation\folder_$I1/File_$I1.txt ");
unlink (" \\SomeLocation\folder_$I2/File_$I2.txt ");
Comment