<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BioGem.Org &#187; Addition</title>
	<atom:link href="http://www.biogem.org/tag/addition/feed" rel="self" type="application/rss+xml" />
	<link>http://www.biogem.org</link>
	<description>Bioinformatics Blog Site..</description>
	<lastBuildDate>Sat, 03 Jul 2010 07:57:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Two methods to run PHP script</title>
		<link>http://www.biogem.org/2009/12/two-methods-to-run-php-script.html</link>
		<comments>http://www.biogem.org/2009/12/two-methods-to-run-php-script.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:54:53 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Addition]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=140</guid>
		<description><![CDATA[HTML with PHP :-
HTML: add.htm
&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Adding two numbers&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;form action=&#8221;add.php&#8221; method=&#8221;post&#8221;&#62;
Enter the first number: &#60;input type=&#8221;text&#8221; name=&#8221;a&#8221; size=10&#62;&#60;br&#62;
Enter the second number: &#60;input type=&#8221;text&#8221; name=&#8221;b&#8221; size=10&#62;&#60;br&#62;
&#60;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;ADD&#8221;&#62;
&#60;/form&#62;
&#60;/body&#62;
&#60;/html&#62;
PHP: add.php
&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Adding two numbers&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;?php
$a=$_POST["a"];
$b=$_POST["b"];
$c=$a+$b;
print &#8220;Addition of $a and $b is $c.&#8221;;
?&#62;
&#60;/body&#62;
&#60;/html&#62;
Only with PHP :-
&#60;?php
$a = $_POST["a"];
$b = $_POST["b"];
if (!isset($_POST['add']))
{  // If page is not submitted to itself echo the form
?&#62;
&#60;html&#62;
&#60;head&#62;&#60;title&#62;Adding [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">HTML with PHP :-</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">HTML: add.htm</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;title&gt;Adding two numbers&lt;/title&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;form action=&#8221;add.php&#8221; method=&#8221;post&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the first number: &lt;input type=&#8221;text&#8221; name=&#8221;a&#8221; size=10&gt;&lt;br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the second number: &lt;input type=&#8221;text&#8221; name=&#8221;b&#8221; size=10&gt;&lt;br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;ADD&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/form&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">PHP: add.php</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;title&gt;Adding two numbers&lt;/title&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;?php</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$a=$_POST["a"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$b=$_POST["b"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$c=$a+$b;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">print &#8220;Addition of $a and $b is $c.&#8221;;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">?&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Only with PHP :-</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;?php</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$a = $_POST["a"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$b = $_POST["b"];</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">if (!isset($_POST['add']))</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">{  // If page is not submitted to itself echo the form</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">?&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;html&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;head&gt;&lt;title&gt;Adding Two Numbers&lt;/title&gt;&lt;/head&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;form method=&#8221;post&#8221; action=&#8221;&lt;?php echo $PHP_SELF; ?&gt;&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the first number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;12&#8243; name=&#8221;a&#8221;&gt;&lt;/br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">Enter the second number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;36&#8243; name=&#8221;b&#8221;&gt;&lt;/br&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;input type=&#8221;submit&#8221; value=&#8221;ADD&#8221; name=&#8221;add&#8221;&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/form&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;?</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">}</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">else</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">{</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">$c=$a+$b;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">print &#8220;Addition of $a and $b is $c.&#8221;;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">}</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">?&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/body&gt;</span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: georgia, palatino;">&lt;/html&gt;</span></div>
<p><strong><span style="color: #ff0000;"><span style="font-size: medium;"><span style="font-family: georgia, palatino;">HTML with PHP :-</span></span></span></strong></p>
<p><span style="font-family: georgia, palatino;"><strong><span style="font-family: georgia, palatino;">HTML: </span></strong></span><span style="color: #0000ff;"><strong><span style="font-family: georgia, palatino;">add.htm</span></strong></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Adding two numbers&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form action=&#8221;add.php&#8221; method=&#8221;post&#8221;&gt;<br />
<span id="more-140"></span>Enter the first number: &lt;input type=&#8221;text&#8221; name=&#8221;a&#8221; size=10&gt;&lt;br&gt;<br />
Enter the second number: &lt;input type=&#8221;text&#8221; name=&#8221;b&#8221; size=10&gt;&lt;br&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit&#8221; value=&#8221;ADD&#8221;&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p>
<p><strong><span style="font-family: georgia, palatino;">PHP: </span><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">add.php</span></span></strong></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Adding two numbers&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;?php<br />
$a=$_POST["a"];<br />
$b=$_POST["b"];<br />
$c=$a+$b;<br />
print &#8220;Addition of $a and $b is $c.&#8221;;<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p>
<p><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"><span style="font-family: georgia, palatino;"><br />
</span> </span><span style="font-family: georgia, palatino;"> </span></span></p>
<p><span style="font-family: georgia, palatino;"><strong><span style="color: #ff0000;"><span style="font-size: medium;"><span style="font-family: georgia, palatino;">Only with PHP :-</span></span></span></strong></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;">&lt;?php<br />
$a = $_POST["a"];<br />
$b = $_POST["b"];<br />
if (!isset($_POST['add']))<br />
{  // If page is not submitted to itself echo the form<br />
?&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Adding Two Numbers&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form method=&#8221;post&#8221; action=&#8221;&lt;?php echo $PHP_SELF; ?&gt;&#8221;&gt;<br />
Enter the first number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;12&#8243; name=&#8221;a&#8221;&gt;&lt;/br&gt;<br />
Enter the second number: &lt;input type=&#8221;text&#8221; size=&#8221;12&#8243; maxlength=&#8221;36&#8243; name=&#8221;b&#8221;&gt;&lt;/br&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;ADD&#8221; name=&#8221;add&#8221;&gt;<br />
&lt;/form&gt;<br />
&lt;?<br />
}<br />
else<br />
{<br />
$c=$a+$b;<br />
print &#8220;Addition of $a and $b is $c.&#8221;;<br />
}<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></span></p>
<p><span style="color: #0000ff;"><span style="font-family: georgia, palatino;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/two-methods-to-run-php-script.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Addition using Perl/CGI in Ubuntu</title>
		<link>http://www.biogem.org/2009/12/addition-using-perlcgi-in-ubuntu.html</link>
		<comments>http://www.biogem.org/2009/12/addition-using-perlcgi-in-ubuntu.html#comments</comments>
		<pubDate>Thu, 03 Dec 2009 03:26:03 +0000</pubDate>
		<dc:creator>Ashok Kumar</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Addition]]></category>
		<category><![CDATA[Perl/CGI]]></category>

		<guid isPermaLink="false">http://www.biogem.org/?p=83</guid>
		<description><![CDATA[If Apache web server has installed in your system, you can run Perl/CGI script successfully. Create a html file and perl script using following steps.



Step 1: Creating a web page add.html
Open your console and type:
$ sudo gedit /var/www/add.html
Copy the lines below in the file and save it.

&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Addition of two numbers.&#60;/title&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;br&#62;&#60;br&#62;&#60;br&#62;&#60;br&#62;&#60;br&#62;
&#60;form action=&#8217;cgi-bin/add.pl&#8217; method=&#8217;post&#8217; enctype=&#8217;multipart/form_data&#8217;&#62;
&#60;table border=&#8217;0&#8242; align=&#8217;center&#8217;&#62;
&#60;tr&#62;&#60;td [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-family: georgia,palatino;">If Apache web server has installed in your system, you can run Perl/CGI script successfully. Create a html file and perl script using following steps.</span></p>
<p><span id="more-83"></span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><strong>Step 1:</strong> Creating a web page add.html</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Open your console and type:</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;">$ sudo gedit /var/www/add.html</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Copy the lines below in the file and save it.<strong><br />
</strong></span></p>
<p style="text-align: justify;"><span style="color: #008000;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Addition of two numbers.&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;<br />
&lt;form action=&#8217;cgi-bin/add.pl&#8217; method=&#8217;post&#8217; enctype=&#8217;multipart/form_data&#8217;&gt;<br />
&lt;table border=&#8217;0&#8242; align=&#8217;center&#8217;&gt;<br />
&lt;tr&gt;&lt;td colspan=&#8217;2&#8242; align=&#8217;center&#8217;&gt;<br />
&lt;b&gt;Adding Two Numbers&lt;/b&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Enter the first value:&lt;/td&gt;<br />
&lt;td&gt;&lt;INPUT TYPE =&#8217;text&#8217; NAME=&#8217;n1&#8242;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Enter the second value:&lt;/td&gt;<br />
&lt;td&gt;&lt;INPUT TYPE =&#8217;text&#8217; NAME=&#8217;n2&#8242;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td colspan=&#8217;2&#8242; align=&#8217;center&#8217;&gt;<br />
&lt;INPUT TYPE =&#8217;submit&#8217; VALUE=&#8217;ADD&#8217; NAME=&#8217;submit&#8217;&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><strong>Step 2:</strong> Creating a perl script add.pl</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Open your console and type:</span></p>
<p style="text-align: justify;"><span style="color: #ff0000;"> $ sudo gedit /usr/lib/cgi-bin/add.pl<br />
$ sudo chmod a+x /usr/lib/cgi-bin/add.pl</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">The command <span style="color: #ff0000;">chmod a+x</span><strong> </strong>is used to allow permission to run the script. Without using this command your program will not run. !!!</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Copy the lines below in the file and save it.<strong><br />
</strong></span></p>
<p style="text-align: justify;"><span style="color: #008000;">#!/usr/bin/perl -w<br />
use CGI;<br />
CGI::ReadParse();<br />
$numb1 = $in{&#8217;n1&#8242;};<br />
chomp($numb1);<br />
$numb2 = $in{&#8217;n2&#8242;};<br />
chomp($numb2);<br />
$numb3=$numb1+$numb2;<br />
CGI::PrintHeader();<br />
print &#8220;content-type:text/html\n\n&#8221;;<br />
print &#8220;&lt;HTML&gt;\n&#8221;;<br />
print &#8220;&lt;head&gt;&lt;title&gt;Addition of two numbers&lt;/title&gt;&lt;/head&gt;\n&#8221;;<br />
print &#8220;&lt;body&gt;\n&#8221;;<br />
print &#8220;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;center&gt;Addition of $numb1 and $numb2 is $numb3.&lt;/center&gt;\n&#8221;;<br />
print &#8220;&lt;/body&gt;\n&#8221;;<br />
print &#8220;&lt;/html&gt;\n&#8221;;</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><strong>Step 3:</strong> Running the program</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;">Open web browser and hit address <span style="color: #0000ff;"><a href="http://localhost/add.html">http://localhost/add.html</a></span> to run the Perl/CGI program.</span></p>
<p style="text-align: justify;"><span style="font-family: georgia,palatino;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.biogem.org/2009/12/addition-using-perlcgi-in-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
