tag:blogger.com,1999:blog-43584252609269195792024-03-05T23:28:41.135-08:00On PERLDaily Learning Blog on PERL ProgrammingYajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-4358425260926919579.post-58002609904054976672012-03-09T20:08:00.000-08:002012-03-09T20:08:33.243-08:00Updating Very Soon<div dir="ltr" style="text-align: left;" trbidi="on">
We are undergoing a self-manipulation process on this learning blog. We will be back within next 8 hours!</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com3tag:blogger.com,1999:blog-4358425260926919579.post-32932182047798681792012-02-13T06:40:00.000-08:002012-02-13T06:40:22.570-08:00Learning PERL | Day 7<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>HI</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Mangal;
mso-bidi-theme-font:minor-bidi;
mso-bidi-language:AR-SA;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">Today we will try to grab some facts about useful
built-in functions used in PERL. Actually, built-in functions provide us useful
means of manipulating operations in PERL without writing some complex codes.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">One such instance of built-in function is square-root
function. It is denoted in PERL by using keyword “sqrt”. To understand its use,
let us have a look at the program code fragment given below:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%;">$NUM = 16;<br />
print sqrt $NUM;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">It will print the digit 4 on the screen. Another
‘good-looking’ way of writing this code fragment is to include the $NUM in
braces. Although, it is not required in PERL, yet, it increases the readability
of the program to you. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">Another built-in function of interest is “int”. It is
used to print only the part of number before the decimal point. For example, if
used with 56.678, it will return 56 to the program. Let us understand its
concept through a code fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%;">$NUM = 56.678;<br />
print int ($NUM);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">In a similar manner, the function ‘print’ prints
everything given to it on screen, as we unknowingly used it in our almost all
programs.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">There are a series of arithmetic in-built functions in
PERL, which we deal in our coming lectures. At this point, I would like to
introduce some functions which are used to be operate on strings. One such
function is “length”. It is used to give the number of characters used in the
string. Let us take an example.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%;">$Test_String = “This is a test string.”;<br />
print length($Test_String);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">Provided the spaces are also count in characters, the
output of the above code-fragment is 22. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">Another in-built string functions are “lc” and “uc”.
These are used for converting the string to all-lower case and all-upper case
respectively, irrespective in which case they are initially in.</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">Let us take an example to understand it:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%;">print uc(“convert me to upper case”);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">The above code fragment will print the string in all
upper-case as: CONVERT ME TO UPPER CASE. Similar method applies with the
built-in function “lc”.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">In addition to these basic string functions, there are a
variety of other string functions used in PERL, which we deal in our coming
blog learning sessions. In addition to the functions which takes arguments to
perform an operation, there are functions, which need no argument to operate.
Such a function, which is usually prove important in game programming is “rand”
function. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">“rand” function is used to print a random number between
0 and 9. Let us understand it with the help of an example. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%;">print rand();</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">It will print any random number between 0 and 9, say, it
be 7.0304934458. However, sometimes, we need random numbers between certain
upper limit, say between 0 and 7.009. In this condition, the upper limit can be
treated as the argument of the “rand” function. Taking an example:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12.0pt; line-height: 115%;">print rand(7.009);</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">It will print a random number between 0 and 7.009, say it
to be, 5.373643441, but it will never be 7.9344344351.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">PERL has many in-built functions which prove useful in
various operations. We will learn about some important of them in our coming
blog learning sessions.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">Hope you are finding these blog learning sessions useful
and enjoyable!</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12.0pt; line-height: 115%;">With Warm Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com4tag:blogger.com,1999:blog-4358425260926919579.post-16056424736866243822012-01-30T07:25:00.000-08:002012-01-30T10:36:01.408-08:00Learning PERL | Day 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Hi friends! In our last blog learning session, we grabbed
some knowledge about the flow of control in PERL programming by using ‘if-else’
statements. Let us understand today these ‘if-else’ statements by means of some
examples.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Consider you are asked to build a program which can classify
the customers in a bank as premium, important and regular customer on the basis
of the balance they have in their bank accounts. Classification is to be made
like this: </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<div style="text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXQtBjb1zzMQoMNCaOxQlpAh64EcMs5cAkf2vD7YMnOy_7zJxALefudxW8vf7ZqwBi6t8U1R7nZw0AStegzB4VY_mz1tc8igLv4tJ_wmUk8V1GErbMoU6wwy6dD5G31I8qeet1y6QB1aV7/s1600/perlpic2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXQtBjb1zzMQoMNCaOxQlpAh64EcMs5cAkf2vD7YMnOy_7zJxALefudxW8vf7ZqwBi6t8U1R7nZw0AStegzB4VY_mz1tc8igLv4tJ_wmUk8V1GErbMoU6wwy6dD5G31I8qeet1y6QB1aV7/s400/perlpic2.jpg" width="400" /></a></div>
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">“those customers with amount deposited over $1,000,000
are to be treated as premium; those having amount deposited between $500,000
and $1,000,000 are to be treated as important customer; and finally, those
left, i.e., customers with deposits below $500,000 are to be treated as regular
customers.”</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">This problem can be converted into a PERL program which
can be used to distinguish the various classes of customers. Let us see how it
is done:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if ($balance > 1000000)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nPremium Customer.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">elsif ($balance > 500000)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nImportant Customer.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">else</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> Print “\nRegular Customer.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">In the program illustrated above, the flow is designed in
such a way that there is the need of only one condition to be specified in the
body of execution. ‘Body of Execution’ is the block below each condition, it is
included in the curly-brackets ( { <body> } ).</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">One more thing to notice here is that we do not put
terminator (;) after the if or elsif or else statement. It is because the
statement as a whole does not terminates at the same line, if found correct, it’s
body will be executed, which is in the next line starting with ‘{‘ and ending
with ‘}’. It is a common mistake to put terminator after the flow statement. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">One more that I want to discuss today is the use of
comments in our programs. Suppose you are working on a big-big and complex
program which uses various formulae and statements. It is a usual thing that
you may not be able to grasp your own coding if viewed later. So, to keep our
program meaningful to us and to other programmers, we use some statements which
help us in grabbing the idea about our program. These statements are completely
ignored by the PERL interpreter. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">In PERL, comments begin with ‘#’ symbol. In other words,
if you put ‘#’ in a line, all the characters after become invisible to
interpreter. Let us re-write the above program using comments to make it more
illustrative.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if ($balance > 1000000)
# first condition </span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nPremium Customer.”; #
Body of first condition</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">elsif ($balance > 500000)
# second condition</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nImportant Customer.”;
# Body of second condition</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">Else # Final condition</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> Print “\nRegular Customer.”; # Body
of final condition</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">This concludes today’s learning session on PERL learning
blog. Hope you are finding these learning sessions interesting and easy to
understand.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">With Warm Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com12tag:blogger.com,1999:blog-4358425260926919579.post-64863149784794323912012-01-26T07:35:00.000-08:002012-01-26T07:43:14.757-08:00Learning PERL | Day 5<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Hi friends! Till now, I think we have grabbed sufficient to start out
study of flow of control in PERL programming. By flow of control, I mean how
the control of program passes from one step to another. It can be understood as
the main deciding factor or program flow logic.</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">In our previous blog learning session, I introduced ‘if-else’
statements; however, I left their deep understanding for today. So, let us
understand the functioning of these ‘if-else’ statements today.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The ‘if’ statement is used to specify a particular
condition, often, a logic statement. It can be understand by following syntax:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if (<condition>)</span><span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> <Steps to follow></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span><br />
</div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Consider the following code fragment to understand this
syntax:</span></div>
<div class="MsoNormal">
<br />
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if ($x==0)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nThe value of x is
zero”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The above code fragment is used to check whether the
value of x is zero. To judge this, we first used if statement with condition “$x==0”,
which means the statement that “x equals zero”. If this condition is found
true, the statement body will be executed, which prints “The value of x is
zero.” on the screen, otherwise, it will be skipped.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">If it is needed that provided the first condition is
skipped, the program will check for the second condition, ‘if-else’ or ‘else’
statement is used. The general syntax of ‘if-else’ nesting, which can be extend
to the limit we need, is:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if (<condition_1>)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{ </span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> <Steps to follow></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">else if (<condition_2>)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> <Steps to follow,
provided condition_1 is wrong></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">else</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> <Steps to follow,
provided all conditions are wrong></span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">We will understand the ‘if-else’ nesting with a suitable
example in our tomorrow’s learning session on this blog.</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Hope you enjoyed today’s learning session on PERL.</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Happy Republic Day to my readers from India.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">As always, if you find anything difficult or if you have
any suggestion, please feel free in discussing with me.</span></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">With Warm Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com1tag:blogger.com,1999:blog-4358425260926919579.post-18203235632413636442012-01-24T08:15:00.000-08:002012-01-24T10:49:39.457-08:00Learning PERL | Day 4<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Hi friends! Let’s recall what we grabbed in our yesterday’s
blog session. Yesterday, I told you about operators in PERL, which was actually
an overview. So, today we will learn a little more about operators.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Occasionally, we need to change the value of the
variables in the program. This can be done by applying some relation e.g., if
the value of some constant A is 5, but you now need it to be 10, this can be
done by:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">A = A + 5;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Shorthand of writing this expression is:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">A + = 5;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Similarly, if any similar expression can be shorthanded.
Let us take another example. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">C = C – A;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Is equivalent to writing:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">C - = A;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Now, if I need to increase or decrease the value of a
variable by unity, this can be done in a very handy way by either adding ‘++’
or ‘--’ after or before it. For example, if I need to increase the value of
variable x by 1 in the program, then the coding will be:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">x++;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">or</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">++x;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Now, one question might arising in your mind is what’s
the difference between “x++” and “++x”? The answer is somewhat tricky to those
who are new learners of programming. Actually, “x++” means “addition is carried
out after the variable is used in the specified operation” and “++x” means “addition
is carried out before the variable is used in any further operation”. </span></div>
<div class="MsoNormal">
<br />
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">If you are a new learner and facing difficulty in
understanding above paragraph, just leave it for today. You will be able to
grab the concept in the next blog learning sessions for sure. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Similarly, if you need to decrease the value of variable
y by unity, use the code:</span></div>
<div class="MsoNormal">
<br />
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">y--;</span></div>
<div class="MsoNormal">
<br />
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">or </span></div>
<div class="MsoNormal">
<br />
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">--y;</span></div>
<div class="MsoNormal">
<br />
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Let us know about some other basic operators. However, we
will learn their implementation in our coming blog learning sessions.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">You might me familiar with “>” and “<”, known as “greater
than” and “less than” operators. In addition, there are some other logic
operators viz. “>=”, known as “greater than or equal to”; “<=”, known as “less
than or equal to”; “!=”, known as “not equal to”; “==”, known as “is equal to”. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The above described logic operators are used in certain
logic operations. For example, consider the following code fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if ($var1 > $var2)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nFirst variable is
greater than second variable.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The first statement of this code fragment is a logic
statement to judge whether first variable that is, var1 is greater that second
variable, that is, var2. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Let us take another example to understand the operation
of other logic operators. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Consider following code fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if ($x != 0)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nValue of x is not
zero.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The above code fragment is whether to check the value of
x is not zero. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">If I need to check whether the value of two variables are
equal, following code can be used:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">if ($var_1 == $var_2)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{ </span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nVariable 1 equals
Variable 2.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Note that in the above code fragment, we used ‘==’, that
is, ‘equal to’ sign two times. A common mistake can be the use of single ‘equal
to’ operator. This will lead to assigning of value of $var_2 to var_1. Hence,
the following coding is wrong:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">If ($var_1 = $var_2)</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">{ </span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> print “\nVariable 1 equals
Variable 2.”;</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">So, this concludes our today’s learning session on PERL
learning blog. In our next sessions, we will deal with more complex coding in
PERL. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">As always, if you find anything difficult or if you have
any suggestion, please feel free in discussing with me.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">With Warm Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com0tag:blogger.com,1999:blog-4358425260926919579.post-22051942931591975252012-01-23T02:31:00.000-08:002012-01-23T02:42:09.743-08:00Learning PERL | Day 3<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Hi friends! Yesterday we learnt about different datatypes used in
PERL. The most important thing in any program is the governing logic which is
implemented by using various formulae and algorithms. To implement formulae, we
need to use certain operators with our variables so that we could get the
desired output value.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Let us introduce ourselves today with the operators used
in PERL programming. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Here are some elementary things for beginners. For simple
addition, we use ‘+’ sign, as we used in our first program. Similarly, for
subtraction, ‘-‘; for multiplication, ‘*’; for division, ‘/’. Also, ‘**’ is
used for exponentiation. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">For example, if I wish to store value of variable term
x<sup>y , </sup>that is, ‘x raised to the power y’<sup> </sup>in dependent variable
‘f’, the code fragment should be:</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">$f = </span><span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;"> </span><span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">$x ** $y;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">One common mistake anyone can make is confusing with
complex formula like:</span></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">$avg = $var1 + $var2 / 2;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The above written code-fragment is intended to calculate
average value of two variables, but, is, however, wrongly coded. The reason is that precedence of ‘/’, that is, division operator over ‘+’, that is addition. To
use the code correctly, we should use braces:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">$avg = ($var1 + $var2) / 2;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">,which is correct now.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">I found by my learning experience that cramming the precedence
sheet of operators is a really put everything in mesh. So, I recommend my
readers to better make full use of braces ‘()’. Using braces avoids unnecessary
confusion and possibility of wrong coding.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">In many places, we need to store two strings stored in
separate variables to one variable. For example, $first_name contains first
name of employees in a company and $last_name contains last name of employees
and what we need is to store their full name in single variable, we use ‘.’,
that is, ‘dot’ operator. The operation is occasionally referred as concatenation. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">For understanding, consider following code-fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">$first_name = “John”;<br />
$last_name = “Smith”;<br />
$full_name = $first_name . $last_name;<br />
print $full_name;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The output of above code fragment will be John Smith. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Another interesting operator is ‘x’, that is, English alphabet
small x. It is used for concatenation of string to itself in specified number
of times. <br />For example, consider the following code fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">$string = “Hello”;<br />
print $string x 3;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The above code will produce HelloHelloHello as output.
So, for remembering, it could be think as like multiplying the string into any
number of times. If we specify zero as the concatenation number, the string
will lead to no value or empty value, specified by “ “.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Some operators used in producing statements or strings in
the program are ‘\n’ and ‘\t’, which are known as newline and tab character
respectively. The newline character, ‘\n’, is used to produce output in new
line. ‘\t’ represents a tab. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">For example, consider the following code fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">print “Line 1\nLine 2”;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">This code will produce output as:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Line 1<br />
Line 2</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">But, what if I need to print exactly ‘Line 1\nLine 2’ on
the screen? That’s a tricky one. It can be done by using single quotes e.g., ‘string’,
instead of double quotes e.g., “string”. <br />Hence, the following code fragment:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 12pt; line-height: 115%;">print ‘Line 1\nLine 2’;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">will print exactly </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Line 1\nLine 2</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">So, this concludes your today’s learning session on PERL
blog. I hope you are still finding it relatively easier than C and C++, if you
have used them before. Otherwise, there is nothing to ponder upon.</span><span style="font-family: Consolas; font-size: 12pt; line-height: 115%;"> </span><span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;"></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Please feel free in e-mailing me your suggestions and
questions, if any, at <a href="mailto:yajurlive@live.com">yajurlive@live.com</a>
</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">With Warm Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com0tag:blogger.com,1999:blog-4358425260926919579.post-37012291367267529972012-01-22T02:33:00.000-08:002012-01-23T02:39:32.928-08:00Learning PERL | Day 2<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Welcome back friends!</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Yesterday we learn about writing a simple addition program
in PERL. To recall you, we coded a program for simple addition in which we used
two variables, “$x” & “&y”:</span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;"> </span><span style="font-family: Consolas;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Consolas;">$x = 100;<br />
$y = $x + $x;<br />
print $y;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">I stated in my previous blog that variables are used for
storing ‘varying data’ that we need or generated in the program. So, you may
have noticed one thing about the variable names e.g., in “$x” and “$y”, why we
are using this “$” sign before any variable? The answer is related to the
identification of these variables as ‘variables’ by the PERL interpreter. The “$”
sign tells the PERL interpreter that it is dealing with a variable. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">A variable name, which starts from “$” sign, may contain
letters(a-z, A-Z), numbers(0-9), a special character “_”, known as underscore
or a mixture of these. Example of variable names are $value1, $value2,
$max_value, $min_value etc. There is a limit on number of letters you can use
in variable names, but, don’t worry, I’m sure you will never need to jump over
it. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">The variable names should be descriptive and handy to
you. Such as if you are writing a program to compute EMI on loan amount, and
you use variable names as “$x” and “$y”, and so on, your program may become
uninformative after a few steps, that’s you waste most of your time in
remembering what x stands for, what y stands for etc. I suggest using mixed
type variable names; however, you can omit vowels in words. For example, a good
variable for loan amount can be “$amt_loan”. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">For those who have used to code in ‘C’ before, they may
have familiar with the ‘Datatypes’. For beginners, datatypes simply define what
type of data you are entering or what type of information you want in return
from the machine. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">For example, in some cases you may need integer values like
1423, 88383 etc., and in some other cases you may need to input contact names
as “John Smith”, “Yajur Kumar” etc. So, datatypes simply tells what type of
data the program is dealing with.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">PERL uses three types of datatypes, namely, scalars,
arrays and hashes. Today we only deal with them in short and will learn about
them in detail in our next learning sessions in this blog. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Scalars can have any kind of value, viz. a character, a
whole number, an integer, or a string. Scalars variable names starts with “$”
symbol, as we learned in our first program. Further, for now just remember that
array variables initialize with “@” symbol and hash variables starts with “%”
symbol.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Also, I like one thing of PERL that it does not need to
declare any variable before using it like other programming languages e.g., C
and C++. We can use the variables directly without bothering about their declaration
in the program.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">So, this concludes your second day at PERL learning blog.
Tomorrow we will go through some basics in scalar data types. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">Hope you find today’s blogpost interesting. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif"; font-size: 12pt; line-height: 115%;">With Warm Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com2tag:blogger.com,1999:blog-4358425260926919579.post-91695193841935326572012-01-20T21:30:00.000-08:002012-01-30T07:42:57.939-08:00Learning PERL | Day 1<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: "Arial","sans-serif"; font-size: 11pt;">Hello
Friends! I spent a long, long time in advancing my knowledge over PERL-the most
amazing programming language to deal with. I usually saw new programmers
worrying much about dealing with PERL, they treat it as a threat to learn after
seeing it's 1300-1400 paged books. Since, I learned it in a slight different
way, and find it enjoying, I think I should spread the words out here in my daily
blog. <br />
<br />
In my this daily basis learning blog, I will introduce the basics of PERL
programming language and it's my humble belief that if you visit and read this
blog course-ware daily, you will learn PERL in an easiest and enjoyable way. The
notes you get from here will help you understanding PERL basics which can help
you in your homework, in college studies and in many day-to-day tasks in
programming because PERL is everywhere.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4rq4LkutXeJnPkOJlejGsutcTjJZmGeWOeYleSTx6gTq9NJNdO9989T26Re-fRygHbrZd1MqR3QtMVDk7NjgO5NKhLpF6bt2TPl0QBI-YfsmBJrZde6-PjgxJtP0nZxZaJd8_SwmAAvUF/s1600/perlpic1.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4rq4LkutXeJnPkOJlejGsutcTjJZmGeWOeYleSTx6gTq9NJNdO9989T26Re-fRygHbrZd1MqR3QtMVDk7NjgO5NKhLpF6bt2TPl0QBI-YfsmBJrZde6-PjgxJtP0nZxZaJd8_SwmAAvUF/s400/perlpic1.jpg" width="400" /></a></div>
<span style="font-family: "Arial","sans-serif"; font-size: 11pt;"><br />
So, let us start with the introduction of PERL first. PERL is a programming
language created in 1987. It stands for Practical Extraction and Report
Language. First of all, on our first learning day, please note that you will
need to download PERL to run its programs on your computer. Mostly, if you are
using your college computer, there is a possibility that it is already
installed there, since, it is widely used as a learning tool. In case, you find
it is not there, you can download its free copy from <a href="http://www.perl.org/" target="_blank">PERL website.</a><br /><i><br /></i></span><br />
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";"><b><i>Let’s start our
day 1 of programming.</i> </b>To write a PERL program, you need a text editor, for
which I recommend notepad++, which is downloadable for free from <a href="http://notepad-plus-plus.org/" target="_blank">Notepad++ website</a>.
I recommend using notepad++ because it offers many additional features like
helping you in commands, different colors for variables and keywords etc.,
which may help you recognizing your program easily. Alternatively, you can use
notepad also. Please note that using word processing software like Microsoft
Word can produce unexpected results since they add formatting data to your
codes. So, it is not suggested to use any word processing software. Also, I
recommend saving your PERL codes with “.pl” extension. Although it is not
necessary to do so because PERL won’t bother about filename extensions, but, in
this way it looks nice and also some operating systems does not allow saving a
file without any extension.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">So, let us
start with the simplest program on our first day. It is, addition of two
numbers. The source code of this program is:</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Consolas;">$x = 100;<br />
$y = $x + $x;<br />
print $y;</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">Type the code
fragment given above in notepad++ and save it under filename “SimpleAddition.pl”.
</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">Now, let us
understand what the symbols used in above code means. </span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">$x and $y are
known as variables and are used for storing data in the program. You can
understand them as initially empty baskets. Although, they may contain garbage
values if you do not initialize them with any finite values first. <br />Our second
line of code, “$y = $x + $x;” means “put the value of ($x + $x) in $y”. This is
the main formula of our program. <br />Lastly, there is “print $y” which means “print
whatever contained in $y”. <br />Also, you might have noticed that we have put a semicolon
“;” after every line. It is used to terminate a particular statement and is
known as terminator.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">Well, so,
till now we have written a basic addition code in PERL. Let us check if our
program gives an expected output. To get the output, run the program by commanding
“perl SimpleAddition.pl”, which should return you value “200”. Since, we do not
define the preciseness we need in our program, in some systems, the output may
be like “200.00000000000”. </span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">So, that’s
over for today. Today we learn some basics of writing a program in PERL and
tried a simple program. Well, you know, this is a good start for your first day
as a beginner. In my next blogs, I will tell you about how to write more
complex and tricky programs and some more basics of PERL.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">Hope you find
this blog learning session enjoyable. In case you have further query, please
feel free in posting your comment.</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Arial","sans-serif";">With Warm
Regards,<br />
Yajur Kumar<br />
(PERL Programming Expert)</span></div>
</div>Yajur kumarhttp://www.blogger.com/profile/00447240146158658149noreply@blogger.com2