<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3391828488627720397</atom:id><lastBuildDate>Thu, 05 Sep 2024 01:26:40 +0000</lastBuildDate><category>perl source code</category><category>Perl</category><category>perl die function</category><category>perl eval function</category><category>C</category><category>Perl functions</category><category>REGEX</category><category>arguments</category><category>array</category><category>array elements</category><category>block</category><category>complex string comparisons</category><category>complex string replacements</category><category>complex string selections</category><category>data table</category><category>de-referencing</category><category>double-precision floating point values</category><category>element</category><category>empty string</category><category>fields</category><category>file input</category><category>file output</category><category>for loop</category><category>hash</category><category>hash elements</category><category>instantiating</category><category>interpolation</category><category>line-at-a-time sequential input</category><category>list</category><category>logical comparison</category><category>object</category><category>parsing</category><category>perl file input</category><category>perl file output</category><category>perl foreach loop example source code</category><category>perl foreach loop syntax</category><category>perl foreach lop</category><category>perl hash</category><category>perl hash indexing</category><category>perl join operator</category><category>perl lexer</category><category>perl parser</category><category>perl scanner</category><category>perl split function</category><category>perl split operator</category><category>perl warn functrion</category><category>records</category><category>referencing</category><category>regular expressions</category><category>scalar</category><category>source code examples</category><category>strawberry perl</category><category>string</category><category>subroutines</category><category>syntax</category><category>undefined</category><category>zero string</category><title>PERL 5</title><description></description><link>http://perlelcric.blogspot.com/</link><managingEditor>noreply@blogger.com (Ron Tinnel)</managingEditor><generator>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-4832622322650204451</guid><pubDate>Wed, 14 Dec 2011 10:35:00 +0000</pubDate><atom:updated>2013-03-03T21:14:57.666-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl file input</category><category domain="http://www.blogger.com/atom/ns#">perl file output</category><category domain="http://www.blogger.com/atom/ns#">perl lexer</category><category domain="http://www.blogger.com/atom/ns#">perl parser</category><category domain="http://www.blogger.com/atom/ns#">perl scanner</category><category domain="http://www.blogger.com/atom/ns#">perl source code</category><title>PERL PARSER DEFINITIONS</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL PARSER DEFINITIONS&lt;/title&gt;

&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 

&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Perl parser basic concepts.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I.&amp;nbsp;&amp;nbsp;PERL PARSER DEFINITIONS&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;A. SCANNER&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A scanner is the first module in a compiler or interpreter.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A scanner&#39;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;s job is to read the source file one character at a time.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A scanner&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;can also keep track of which line number and character is currently being read.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;B. &amp;nbsp;LEXER&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A lexer is a module that serves to break up the source file into pieces called tokens.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A lexer&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;calls the scanner to get characters one at a time and organizes them into tokens and token types. The lexer calls the scanner to pass the scanner one character at a time and groups them together and identifies them as tokens for the language parser.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;C. &amp;nbsp;PARSER&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A parser is the part of a compiler that really understands the syntax of the language.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A parser&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;calls the lexer to get tokens and processes the tokens according to the syntax of the language.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Perl is &quot;the language for text analysis.&quot; &amp;nbsp;The built-in operators make&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;pattern matching,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;text searching, and replacing enjoyable.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Lets start by examining the following file, and we will have fun as we go along.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;II.&amp;nbsp;&amp;nbsp;PERL OUTPUT EXAMPLE SOURCE CODE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;Copy Paste&quot; the following Perl program into your text editor:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Unicode&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;use utf8;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Provides undefined value warnings.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;use warnings;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#enables -w flag.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;use diagnostics;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Helps you catch typos.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Forces you to use my() function to declare all variables.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#The my() function makes the variables local to the main package.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;use strict;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#stack trace&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;use Carp ();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open STDOUT, &quot;&amp;gt;C:/Strawberry/flower.txt&quot;;&amp;nbsp;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;A bug sat in a silver flower&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;thinking silver thoughts.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;A bigger bug out for a walk&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;climbed up that silver flower stalk&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;and snapped the small bug down his jaws&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;without a pause&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;without a care&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;print &quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;for all the bug&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-small;&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;s small silver thoughts.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;print &quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;It isn&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-small;&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;t right it isn&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-small;&quot;&gt;’&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;t fair that big bug ate that little bug&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;because that little bug was there.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;&lt;/span&gt;He also ate his underwear.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit; font-size: xx-small;&quot;&gt;close STDOUT;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;From your text editor, &quot;File Save As&quot;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;writeFlower.pl&amp;nbsp;&lt;/span&gt;using the path to the folder of your Perl download; e.g.:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;C:\Strawberry\&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;writeF&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;lower.pl&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Depending on your operating system platform, when you open Perl, you will have a Perl prompt similar to the following:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;From the above Perl prompt type:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;C&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;:\Strawberry\writeFlower.pl&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Press&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Enter&lt;/span&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;After you press&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Enter&lt;/span&gt;, Perl will display the following:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Instead of writing the poem to your screen, Perl wrote the poem to the file&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;flower.txt&lt;/span&gt;&amp;nbsp;using the path to the folder of the Strawberry Perl download.&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;flower.txt&lt;/span&gt;&amp;nbsp;will be the first file we will examine as we write our Perl parsers.&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;III.&amp;nbsp;&amp;nbsp;PERL INPUT EXAMPLE SOURCE CODE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;Copy Paste&quot; the following Perl program into your text editor:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#Unicode&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: purple;&quot;&gt;use utf8;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: purple;&quot;&gt;use warnings;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#enables -w flag.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: purple;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#Forces you to use my() function to declare all variables.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#The my() function makes the variables local to the main package.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: purple;&quot;&gt;use strict;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: lime;&quot;&gt;#stack trace&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: purple;&quot;&gt;use Carp ();&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; line-height: 9px;&quot; /&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;$file = &quot;C:/Strawberry/flower.txt&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: xx-small;&quot;&gt;#Open the file and read data.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: xx-small;&quot;&gt;#Die with grace if it fails.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Read the file into the array @lines.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;@lines = &amp;lt;FILE&amp;gt;;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Print the file to the screen.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;print @lines;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Close the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;File Save As&quot;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;readFlower.pl&lt;/span&gt;&amp;nbsp;using the path to the folder of your Perl download; e.g.:&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\readFlower.pl&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;From the Perl prompt type the following:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;:\Strawberry\readFlower.pl&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press Enter and the following will display on your screen:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\WINDOWS\system32&amp;gt;C:\Strawberry\readFlower.pl&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;A bug sat in a silver flower&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;thinking silver thoughts.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;A bigger bug out for a walk &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;climbed up that silver flower stalk&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;and snapped the small bug down his jaws&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;without a pause&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;without a care&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;for all the bug’s small silver thoughts.&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;It isn’t right it isn’t fair&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;that big bug ate that little bug &lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;b&gt;because that little bug was there.&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;He also ate his underwear.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;b&gt; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned some of the basic concepts required for a Perl parser, enjoy!&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/blog-post_13.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-3853821437661989424</guid><pubDate>Wed, 14 Dec 2011 10:33:00 +0000</pubDate><atom:updated>2013-03-03T21:17:22.516-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl source code</category><category domain="http://www.blogger.com/atom/ns#">perl warn functrion</category><title>PERL WARN( ) FUNCTION</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL WARN( ) FUNCTION&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt;
 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;warn( )&amp;nbsp;&lt;/span&gt;function.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL WARN( ) FUNCTION&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;warn( &amp;nbsp;)&lt;/span&gt; function and the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;die( &amp;nbsp;)&lt;/span&gt; function have the same functionality;&amp;nbsp;however, when the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;warn( &amp;nbsp;)&lt;/span&gt; function is used your program is not exited.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;warn( &amp;nbsp;)&lt;/span&gt; function is better suited for non-fatal messages like low memory or disk space conditions.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If we try to change to the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;/examples&lt;/span&gt; directory and the change fails, the consequences are not fatal&amp;nbsp;because the files can still be written to the current directory.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;chdir(&#39;/examples&#39;) ||&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;warn(&quot;WARNING: Using current directory instead of /examples&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;: $!\n&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If the&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;/examples&lt;/span&gt;&amp;nbsp;directory does not exist, t&lt;/b&gt;&lt;b&gt;he above code displays the following error message:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;WARNING: Using current directory instead of /examples:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;II. &amp;nbsp;PERL $!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$!&lt;/span&gt; variable is used in the above error message to have it followed by a display of the appropriate system error message.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;warn( )&amp;nbsp;&lt;/span&gt;function.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-warn-function.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-448424860356403177</guid><pubDate>Wed, 14 Dec 2011 10:31:00 +0000</pubDate><atom:updated>2013-03-03T21:20:32.913-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl foreach loop example source code</category><category domain="http://www.blogger.com/atom/ns#">perl foreach loop syntax</category><category domain="http://www.blogger.com/atom/ns#">perl foreach lop</category><title>PERL FOREACH LOOP</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL FOREACH LOOP&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;foreach&amp;nbsp;&lt;/span&gt;loop.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL FOREACH LOOP&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The basic kinds of loops in Perl are the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; loop, the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;while&lt;/span&gt; loop, and the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop.&amp;nbsp;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop is a form of the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; loop.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop is used to iterate through the elements of an array.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop can be used to:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A. &amp;nbsp;Find the largest element in an array.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;B. &amp;nbsp;Print the elements of an array.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C. &amp;nbsp;Determine if a certain value is one of the elements of an array.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;II. &amp;nbsp;PERL FOREACH LOOP SYNTAX&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The syntax for the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop is as follows:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach loopVariable (ARRAY) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;loopVariable&lt;/span&gt; is assigned the value of each array element, until the end of the array is reached.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;III. &amp;nbsp;PERL FOREACH LOOP EXAMPLE&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;In addition to the Perl builtin system functions Perl gives you the ability to make subroutines, which are user-defined functions.&amp;nbsp;&amp;nbsp;The Perl builtin system functions can be combined and incorporated into your user-defined functions.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The following subroutine uses the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop to iterate through the elements of an array:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Subroutine max definition&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Parameter array @_&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;sub max {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my($max) = shift(@_);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach my $temp (@_) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$max = $temp if $temp &amp;gt; $max;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;return($max);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;IV.&amp;nbsp;&amp;nbsp;PERL FOREACH LOOP SOURCE CODE&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;A. &amp;nbsp;CREATE TEXT INPUT DATA FILE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;First we need to create the text input data file.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;A Perl script is just a text file. &amp;nbsp;Perl script files end with the&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;.pl&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;extension.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&quot;Copy Paste&quot; the following Perl program into your text editor:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Unicode&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use utf8;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use warnings;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#enables -w flag.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Turn on verbose warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Forces you to use my( ) function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#my variables (lexical variables) are faster than globals.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use strict; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Stack trace.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use Carp ();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open STDOUT, &quot;&amp;gt;c:/strawberry/array.txt&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;0\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;1\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;2\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;3\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;4\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;5\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;6\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;7\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;8\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &quot;9\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;close STDOUT;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&quot;File Save As&quot; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;writeArray.pl&lt;/span&gt; using the path of the Perl download; e.g.:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:\strawberry\writeArray.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Depending on your platform you will have a Perl prompt as follows:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;From the above Perl prompt type:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:\strawberry\writeArray.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press Enter.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Perl will display the following on your Perl prompt:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The Perl prompt screen is blank because the numbers we plan to load into our array were printed to the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;array.txt&lt;/span&gt; file on your hard drive and not your Perl prompt screen.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Now we have a text file named &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;array.txt&lt;/span&gt; which contains the numbers we want to read from the text file into an array.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;B. &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;PROCESS DATA FILE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&quot;Copy Paste&quot; the following Perl program into your text editor:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Unicode.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use utf8;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use warnings;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#enables -w flag&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Turn on verbose warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Forces you to use my( ) function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#my variables (lexical variables) are faster than globals.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use strict;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Stack trace.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use Carp ();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;  local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Subroutine max definition&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Parameter array @_&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;sub max {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;   my($max) = shift(@_);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;   foreach my $temp (@_) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;   $max = $temp if $temp &amp;gt; $max;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;   }&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;   return($max);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my $file = &quot;c:/strawberry/array.txt&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Open the file and read data.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Die with grace if it fails.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Read text data file into array @lines.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my @lines = &amp;nbsp;&amp;lt;FILE&amp;gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Call (invoke) subroutine and print return.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print &amp;amp;max(@lines);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Close file handle FILE.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&quot;File Save As&quot; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;readArray.pl &lt;/span&gt;using the path of the Perl download; e.g.:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:\strawberry\readArray.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;From the Perl prompt window type the following:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:\strawberry\readArray.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Press Enter and the following will display on your Perl prompt window:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:\strawberry\readArray.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;9&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The above example demonstrates the basic steps you will perform when you want to use data file input with your Perl programs.&lt;/b&gt; &lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;V.&amp;nbsp;&amp;nbsp;PERL FOREACH LOOP SUMMARY&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;When you want to solve a problem that includes using an array always think about how the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop can help you. &amp;nbsp;Using the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop we easily found the largest element in our array. &amp;nbsp;All we needed was data to load into the array. &amp;nbsp;The data will be the information you want to process.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;foreach&amp;nbsp;&lt;/span&gt;loop.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/b&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-foreach-loop.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-3935219726762306422</guid><pubDate>Wed, 14 Dec 2011 10:30:00 +0000</pubDate><atom:updated>2013-03-03T21:21:35.718-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Perl functions</category><title>PERL FUNCTIONS AND OPERATORS</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL FUNCTIONS AND OPERATORS&lt;/title&gt;
&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; text-align: center;&quot;&gt;











&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-size: x-large;&quot;&gt;&lt;i&gt;PERL FUNCTIONS AND OPERATIONS&lt;/i&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;table border=&quot;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;abs&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;absolute value&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;chdir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;change current directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;chmod&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;change permissions of file/directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;chomp&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;remove terminal newline from string variable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;chop&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;remove last character from string variable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;chown&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;change ownership of file or directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;close&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;close a file handle&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;closedir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;close a directory handle&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;cos&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;cosine&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;defined&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;test whether variable is defined&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;delete&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;delete a key from a hash&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;die&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;exit with an error message&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;each&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;iterate through keys and values of a hash&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;eof&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;test a filehandle for end of file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;eval&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;evaluate a string as a perl expression&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;exec&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;quit Perl and execute a system command&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;exists&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;test that a hash key exists&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;exit&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;exit from the Perl script&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;glob&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;expand a directory listing using shell wildcards&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;gmtime&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;current time in GMT&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;grep&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;filter an array for entries that meet a criterion&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;index&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;find location of a substring inside a larger string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;int&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;throw away the fractional part of a floating point number&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;join&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;join an array together into a string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;keys&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return the keys of a hash&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;kill&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;send a signal to one or more processes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;last&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;exit enclosing loop&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lc&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;convert string to lowercase&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lcfirst&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lowercase first character of string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;length&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;find length of string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;local&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;temporarily replace the value of a global variable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;localtime&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return time in local timezone&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;log&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;natural logarithm&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;m//&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;pattern match operation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;map&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;perform on operation on each member of array or list&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;mkdir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;make a new directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;my&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;create a local variable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;next&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;jump to the top of enclosing loop&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;open&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;open a file for reading or writing&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;opendir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;open a directory for listing&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;pack&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;pack a list into a compact binary representation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;package&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;create a new namespace for a module&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;pop&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;pop the last item off the end of an array&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;print&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;print to terminal or a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;printf&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;formatted print to a terminal or file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;push&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;push a value onto the end of an array&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;q/STRING/&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;generalized single-quote operation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;qq/STRING/&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;generalized double-quote operation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;qx/STRING/&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;generalized backtick operation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;qw/STRING/&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;turn a space-delimited string of words into a list&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rand&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;random number generator&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;read&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;read binary data from a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;readdir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;read the contents of a directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;readline&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;read a line from a text file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;readlink&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;determine the target of a symbolic link&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;redo&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;restart a loop from the top&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ref&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return the type of a variable reference&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rename&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rename or move a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;require&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;load functions defined in a library file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return a value from a user-defined subroutine&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;reverse&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;reverse a string or list&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rewinddir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rewind a directory handle to the beginning&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rindex&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;find a substring in a larger string, from right to left&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rmdir&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;remove a directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;s///&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;pattern substitution operation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;scalar&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;force an expression to be treated as a scalar&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;seek&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;reposition a filehandle to an arbitrary point in a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;select&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;make a filehandle the default for output&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;shift&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;shift a value off the beginning of an array&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sin&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sine&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sleep&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;put the script to sleep for a while&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sort&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sort an array or list by user-specified criteria&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;splice&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;insert/delete array items&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;split&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;split a string into pieces according to a pattern&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sprintf&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;formatted string creation&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sqrt&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;square root&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;stat&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;get information about a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;sub&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;define a subroutine&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;substr&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;extract a substring from a string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;symlink&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;create a symbolic link&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;system&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;execute an operating system command, then return to Perl&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tell&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return the position of a filehandle within a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tie&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;associate a variable with a database&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;time&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return number of seconds since a given date&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;tr///&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;replace characters in a string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;truncate&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;truncate a file makes file smaller&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;uc&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;uppercase a string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ucfirst&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;uppercase first character of a string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;umask&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;change file creation mask&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;undef&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;undefine removes a variable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;unlink&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;delete a file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;unpack&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;the reverse of pack&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;untie&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;the reverse of tie&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;unshift&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;move a value onto the beginning of an array&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;use&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;import variables and functions from a library module&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;values&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return the values of a hash variable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;wantarray&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return true in an array context&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;warn&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;print a warning to standard error&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;LEFT&quot; style=&quot;background-color: margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;write&lt;/th&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;formatted report generation&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/b&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-functions.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-5516201928961189225</guid><pubDate>Wed, 14 Dec 2011 10:29:00 +0000</pubDate><atom:updated>2013-03-03T21:00:37.200-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl die function</category><category domain="http://www.blogger.com/atom/ns#">perl eval function</category><title>PERL  DIE(  )  AND EVAL(  ) FUNCTIONS</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL DIE() AND EVAL() FUNCTIONS&lt;/title&gt;
&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In this tutorial, you will learn how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;die( )&amp;nbsp;&lt;/span&gt;function and the&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Perl&amp;nbsp;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;eval( )&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;function&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL DIE( ) FUNCTION&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;die( )&lt;/span&gt; function is used to quit your script and display an error message.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;die( )&lt;/span&gt; function&amp;nbsp;syntax is as follows:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;die(LIST);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The elements of &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;LIST&lt;/span&gt; are printed to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDERR&lt;/span&gt;, and then the script will exit, setting the script&#39;s return value to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$! (errno)&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;die( )&lt;/span&gt; terminates the Perl program if there is an error and prints out an error message.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$!&lt;/span&gt; is a system generated error message number telling you why the system did not do what you requested.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;To use the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;die( ) &lt;/span&gt;function, place it on the right side of the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;||&lt;/span&gt; operator.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;chdir(&#39;/user/printer&#39;) || die(&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;printerYE2011.pl d&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;ied changing directories.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If the&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;/user/printer&lt;/span&gt;&amp;nbsp;directory does not exist t&lt;/b&gt;&lt;b&gt;he following error message will display:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;printerYE2011.pl d&lt;/b&gt;&lt;b&gt;ied changing directories.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Always include an error message telling the user what happened. &amp;nbsp;You also want the error messages to be informative and to look professional.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;For example, you could use the following code to display the error text associated with &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;errno&lt;/span&gt;:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b style=&quot;color: purple;&quot;&gt;chdir(&#39;/user/printer&#39;) || die(&quot;$!&quot;);&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The above code could display the appropriate system error message.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;II. &amp;nbsp;PERL EVAL( ) FUNCTION&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Experiment and look for error messages that communicate best to your users. &amp;nbsp;Especially if you are the user. &amp;nbsp;If you only run a program on rare occasions, error messages will help you remember how to make your program work the way you designed it to work. &amp;nbsp;&lt;/b&gt;&lt;b&gt;For example:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$code = &quot;chdir(&#39;/user/printer&#39;)&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;eval($code) || die(&quot;PROBLEM WITH LINE: $code\n$!, stopped.&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The above code could display the following error message:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;PROBLEM WITH LINE: chdir(&#39;/user/printer&#39;)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;No such file or directory, stopped&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;eval( )&lt;/span&gt;&amp;nbsp;function&lt;/b&gt;&lt;b&gt;&amp;nbsp;compiles and executes&amp;nbsp;&lt;/b&gt;&lt;b&gt;its arguments&lt;/b&gt;&lt;b&gt;&amp;nbsp;at runtime.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;First, the Perl code in &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$code&lt;/span&gt; is executed. &amp;nbsp;If an error arises, the Perl code in &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$code&lt;/span&gt; is displayed as text by the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;die( )&lt;/span&gt; function.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In this tutorial, you have learned how to use the Perl&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;die( )&amp;nbsp;&lt;/span&gt;function and&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;the Perl&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;eval( )&amp;nbsp;&lt;/span&gt;function&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-die-function.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-3908560305209892584</guid><pubDate>Wed, 14 Dec 2011 10:28:00 +0000</pubDate><atom:updated>2013-03-03T21:23:11.898-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl die function</category><category domain="http://www.blogger.com/atom/ns#">perl eval function</category><title>PERL FILEHANDLES</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL FILEHANDLES&lt;/title&gt;



&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn the basic fundamentals of Perl filehandles.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL FILEHANDLE DEFINITION&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;All input and output with Perl files is achieved through filehandling.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;In Perl, files are given a name, a handle, basically another way of saying alias.  A filehandle is nothing more than a nickname for the files you intend to use in your Perl scripts and programs. &lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Like any Perl identifier you could use letters, digits, and underscores; however, y&lt;/b&gt;&lt;b&gt;ou should only use all uppercase letters for your filehandle identifier and&amp;nbsp;&lt;/b&gt;&lt;b&gt;do not start the filehandle with a digit&lt;/b&gt;&lt;b&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;II. &amp;nbsp;PERL RESERVED FILEHANDLE NAMES&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The following six Perl filehandle names have special properties: &lt;span style=&quot;color: purple;&quot;&gt;STDIN&lt;/span&gt;, &lt;span style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;, &lt;span style=&quot;color: purple;&quot;&gt;STDERR&lt;/span&gt;, &lt;span style=&quot;color: purple;&quot;&gt;DATA&lt;/span&gt;, &lt;span style=&quot;color: purple;&quot;&gt;ARGV&lt;/span&gt;, and &lt;span style=&quot;color: purple;&quot;&gt;ARGVOUT&lt;/span&gt;. &amp;nbsp;Only use these six filehandle names when you want to use their special properties.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span style=&quot;color: purple;&quot;&gt;STDIN&lt;/span&gt;, standard in, filehandle is normally connected to your keyboard.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;, standard out, filehandle is normally connected to your computer monitor.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span style=&quot;color: purple;&quot;&gt;STDERR&lt;/span&gt;, standard error, filehandle is also normally connected to your computer monitor.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;III. &amp;nbsp;PERL FILEHANDLE EXAMPLES&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If we have a long file name such as &lt;span style=&quot;color: purple;&quot;&gt;helloworld.txt&lt;/span&gt;, that we do not want to type over and over in our program, we could use &lt;span style=&quot;color: purple;&quot;&gt;HELLO&lt;/span&gt; as the file nickname or filehandle and the following statement to open the file.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;open HELLO, &quot;helloworld.txt&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;In the above statement &lt;span style=&quot;color: purple;&quot;&gt;HELLO&lt;/span&gt; is the name of our filehandle. The filehandle is followed by a comma. The comma is followed by the name of our file in double quotes.  The Perl statement is ended with a semi-colon. Now you can read and write from &lt;span style=&quot;color: purple;&quot;&gt;HELLO&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;When you are done you can use the following statement to close &lt;span style=&quot;color: purple;&quot;&gt;helloworld.txt&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;close HELLO;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In this tutorial, you have learned&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;the basic fundamentals of Perl filehandles&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/data-file-handle.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-1574258932543646728</guid><pubDate>Wed, 14 Dec 2011 10:27:00 +0000</pubDate><atom:updated>2013-03-03T21:24:07.768-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl hash</category><category domain="http://www.blogger.com/atom/ns#">perl hash indexing</category><category domain="http://www.blogger.com/atom/ns#">perl source code</category><title>PERL HASH</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL HASH&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;hash&lt;/span&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL HASH&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;A Perl hash is a Perl array that is indexed by a string instead of a number.&amp;nbsp;Hashes are like arrays except they link a key to a value. &amp;nbsp;To define a hash, use the percent (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;%&lt;/span&gt;) symbol before the name.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;A. &amp;nbsp;PERL HASH INDEXING&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Hashes can be key-value pair indexed using the two scalar variables&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt; and &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt;. &amp;nbsp;The table below contains USA currency portrait and dollar amounts. &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt; is the last name of the person whose portrait is on the bill and &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt; is the face value of the bill in dollars.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;The hash &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;%bills&lt;/span&gt; is declared in bill amount order &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; style=&quot;background-color: white; color: black; font-family: verdana; font-size: 19px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Washington&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Jefferson&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lincoln&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Hamilton&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
10&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Jackson&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
20&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Grant&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
50&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Franklin&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
100&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;McKinley&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
500&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cleveland&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
1000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Madison&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
5000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Chase&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
10000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Wilson&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;II.  PERL HASH EXAMPLE SOURCE CODE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Copy paste the following into your text editor.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use warnings&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#enables perl&#39;s -w flag.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Forces you to use my() function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#The my() function makes the variables local to the main package.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use strict;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: inherit;&quot;&gt;#stack trace&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&lt;b&gt;use Carp ( );&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&lt;b&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my($file) = &quot;C:/Strawberry/hash.pl&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Open the file and read data.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Die with grace if it fails.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;#DEFINE HASH %bills&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;my(%bills) = (&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Washington =&amp;gt; 1,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Jefferson =&amp;gt; 2,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Lincoln =&amp;gt; 5,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Hamilton =&amp;gt; 10,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Jackson =&amp;gt; 20,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Grant =&amp;gt; 50,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Franklin =&amp;gt; 100,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;McKinley =&amp;gt; 500,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Cleveland =&amp;gt; 1000,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Madison =&amp;gt; 5000,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Chase =&amp;gt; 10000,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;Wilson =&amp;gt; 100000,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;print &quot;\n\tBILLS SORTED BY PORTRAIT NAME\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;foreach my&amp;nbsp;$key (sort (keys(%bills))) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;if (length($key) &amp;lt;= 6){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; printf (&quot;\t%s \t\t&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;%.6s&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;\n&quot;, $key, $bills{$key});&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;else{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; printf (&quot;\t%s \t&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;%.6s&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;\n&quot;, $key, $bills{$key});&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Close the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;From your text editor, &quot;File Save As&quot;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;hash.pl&lt;/span&gt;&amp;nbsp;using the path to the folder of your Perl download.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;From the Perl prompt type the following:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\hash.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press Enter and the following will display on your screen:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\hash.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BILLS SORTED BY PORTRAIT NAME&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;Chase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10000&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cleveland &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1000&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Franklin &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Grant &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hamilton &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jackson &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jefferson &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Lincoln &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Madison &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5000&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;McKinley &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;500&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Washington &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Wilson &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;III. PERL HASH SUMMARY&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;The hash&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;%bills&lt;/span&gt;&amp;nbsp;is sorted by bill portrait last name &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; style=&quot;background-color: white; color: black; font-family: verdana; font-size: 19px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Chase&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
10000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cleveland&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
1000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Franklin&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
100&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Grant&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
50&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Hamilton&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
10&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Jackson&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
20&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Jefferson&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
2&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lincoln&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Madison&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
5000&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;McKinley&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
500&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Washington&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;text-align: right;&quot;&gt;
1&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Wilson&lt;/td&gt;&lt;td&gt;100000&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;each( )&lt;/span&gt;&amp;nbsp;function&amp;nbsp;removes the topmost&amp;nbsp;&lt;/b&gt;&lt;b&gt;key-value pair&lt;/b&gt;&lt;b&gt;&amp;nbsp;from the hash and&amp;nbsp;stores them in the variables&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt;. &amp;nbsp;&lt;/b&gt;&lt;b&gt;Each time the loop iterates, the statement (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$key&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$value&lt;/span&gt;) =&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;each(&lt;/span&gt;%bills&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;)&lt;/span&gt;&amp;nbsp;executes and the hash pops off the top key-value pair&amp;nbsp;&lt;/b&gt;&lt;b&gt;and continues doing so until it has gone through every&amp;nbsp;&lt;/b&gt;&lt;b&gt;key-value pair&lt;/b&gt;&lt;b&gt;&amp;nbsp;in the hash. &amp;nbsp;When it is done,&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;each( )&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;returns false and the loop stops running.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;hash&lt;/span&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-hash.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-3041572030691644491</guid><pubDate>Mon, 21 Nov 2011 21:57:00 +0000</pubDate><atom:updated>2013-03-03T21:25:01.458-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl source code</category><category domain="http://www.blogger.com/atom/ns#">perl split function</category><title>PERL SPLIT OPERATOR</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL SPLIT OPERATOR&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;split&amp;nbsp;&lt;/span&gt;operator.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL SPLIT OPERATOR&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&amp;nbsp;operator is commonly used when parsing data from a file or from another program. &amp;nbsp;The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&amp;nbsp;operator allows you to break up a string into an array or a list, by using a specific pattern.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&amp;nbsp;operator is used to split a string into smaller sections.&amp;nbsp;&amp;nbsp;You can split a string on a single character, a group of characters or a regular expression, a pattern.&amp;nbsp;&amp;nbsp;You can also specify how many pieces to split the string into.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&amp;nbsp;operator&amp;nbsp;&lt;/b&gt;&lt;b&gt;syntax &lt;/b&gt;&lt;b&gt;is as follows:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;LIST&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt; = split(/&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;PATTERN&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;/, &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;LIMIT&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;LIST&lt;/span&gt; is a list, array or hash that is returned by the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&amp;nbsp;operator. &amp;nbsp;If&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;LIST&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;is omitted, the Perl&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;operator will be called in a scalar context and the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt; will be split in the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@_&lt;/span&gt; array. &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;b&gt;If&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;LIST&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;is omitted&lt;/b&gt;&lt;b&gt;&amp;nbsp;the operator will return the number of fields in which the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt; will be split. &amp;nbsp;If your call to a&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;operator is inside the body of a subroutine it alters the value of &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@_&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;PATTERN&lt;/span&gt;&amp;nbsp;is normally a regular expression; however, &amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;PATTERN&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;can be a single character or a string. &amp;nbsp;I&lt;/b&gt;&lt;b&gt;f&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;is not specified t&lt;/b&gt;&lt;b&gt;he &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt; is split on every occurrence of the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;PATTERN.&lt;/span&gt;&amp;nbsp; If the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;PATTERN&lt;/span&gt; parameter is omitted, the Perl &lt;span style=&quot;color: purple;&quot;&gt;split&lt;/span&gt; operator will split on whitespace&lt;/b&gt;&lt;b&gt;s&lt;/b&gt;&lt;b&gt;, skipping any leading&amp;nbsp;&lt;/b&gt;&lt;b&gt;whitespace&lt;/b&gt;&lt;b&gt;s.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt; is the string expression that will be split into an array or a list. &amp;nbsp;If&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;is omitted, the content of the special scalar variable &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$_&lt;/span&gt; will be split.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;LIMIT&lt;/span&gt; is the maximum number of fields the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;EXPR&lt;/span&gt; will be split into.&lt;/b&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Only the word split is compulsory. &amp;nbsp;&lt;/b&gt;&lt;b&gt;You can omit the parenthesis, the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;LIST&lt;/span&gt; that will be returned and any of the third arguments presented above.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If you use one of the following metacharacter&amp;nbsp;&lt;/b&gt;&lt;b&gt;inside the pattern y&lt;/b&gt;&lt;b&gt;ou need to escape the&amp;nbsp;&lt;/b&gt;&lt;b&gt;metacharacter&lt;/b&gt;&lt;b&gt;&amp;nbsp;by using the \ backslash character to indicate that the&amp;nbsp;&lt;/b&gt;&lt;b&gt;metacharacter&lt;/b&gt;&lt;b&gt;&amp;nbsp;is to be regarded as something to match and not some fancy character&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;( )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;\&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;For example, if you want to split your string using the pattern &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;/&amp;amp;&amp;amp;/&lt;/span&gt; you need to write it as &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;/\&amp;amp;\&amp;amp;/&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;Perl&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-weight: bold;&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;&amp;nbsp;operator is the opposite of the Perl&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-weight: bold;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;&amp;nbsp;operator. &amp;nbsp;There are a lot of situations where they are used together.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;join&lt;/span&gt;&amp;nbsp;operator concatenates; i.e., joins the elements of a list into a single string.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;split&lt;/span&gt;&amp;nbsp;operator breaks up a single string into a list of strings and returns that list.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;II. &amp;nbsp;PERL SPLIT OPERATOR SOURCE CODE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Copy paste the following into your text editor.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use warnings&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Forces you to use my() function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use strict;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my($file) = &quot;C:/Strawberry/splitOperator.pl&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Open the file and read data.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Die with grace if it fails.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#initialize array&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;my(@fields) = split(/-/, &quot;808-253-4321&quot;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;print &quot;The telephone number is: @fields\n\n&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Close the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;From your text editor, &quot;File Save As&quot; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;splitOperator.pl&lt;/span&gt; using the path to the folder of your Perl download.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;From the Perl prompt type the following:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\splitOperator.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press Enter and the following will display on your screen:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\splitOperator.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;The telephone number is: 808 253 4321&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;split&amp;nbsp;&lt;/span&gt;operator.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-split-function.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-481674939864955723</guid><pubDate>Mon, 21 Nov 2011 10:01:00 +0000</pubDate><atom:updated>2013-03-03T21:25:41.252-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">perl join operator</category><category domain="http://www.blogger.com/atom/ns#">perl source code</category><category domain="http://www.blogger.com/atom/ns#">perl split operator</category><title>PERL JOIN OPERATOR</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div title=&quot;&quot;&gt;
PERL JOIN OPERATOR&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl join operator&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I.&amp;nbsp;&amp;nbsp;PERL JOIN OPERATOR INTRODUCTION&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The syntax form of Perl &lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;join&lt;/span&gt; operator is as follows:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;$string = join (EXPR, LIST);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;The &lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;join&lt;/span&gt; operator has two parameters:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;EXPR may be any string and it represents a separator for the element of the list or array.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;LIST represents a list or array whose elements will be merged into a string.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;The join operator will return a string that contains the elements of the array or list, connected through a string separator.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;II.&amp;nbsp;&amp;nbsp;PERL JOIN OPERATOR EXAMPLE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;b&gt;The following example demonstrates the use of the &lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;join&lt;/span&gt; operator:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;#initialize an array&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;my @perlFunc = (&quot;Mary&quot;,&quot;had&quot;,&quot;a&quot;,&quot;little&quot;,&quot;lamb.&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;my $perlFunc = join &quot; &quot;, @perlFunc;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;print &quot;Perl Functions: $perlFunc\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Output:&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;b&gt;&lt;span style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;Mary had a little lamb.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;We used the space separator &lt;span style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;&quot; &quot;&lt;/span&gt; to glue the elements of the &lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;@perlFunc&lt;/span&gt; array. You can omit the parentheses when you call the Perl &lt;span style=&quot;color: magenta; font-family: Verdana, sans-serif;&quot;&gt;join&lt;/span&gt; operator.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl &lt;span style=&quot;color: magenta;&quot;&gt;join&lt;/span&gt; operator.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://perlelcric.blogspot.com/2011/11/perl-join-function.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-1911564115104174803</guid><pubDate>Fri, 18 Nov 2011 10:23:00 +0000</pubDate><atom:updated>2013-03-03T21:26:42.631-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">for loop</category><category domain="http://www.blogger.com/atom/ns#">Perl</category><category domain="http://www.blogger.com/atom/ns#">perl source code</category><title>PERL FOR LOOP</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL FOR LOOP&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;for&lt;/span&gt;&amp;nbsp;loop.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL FOR LOOP&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The basic kinds of loops in Perl are the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; loop, the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;while&lt;/span&gt; loop, and the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;foreach&lt;/span&gt; loop. The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;for&lt;/span&gt; loop is used to run a block of code a specific number of times.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;The Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;for&lt;/span&gt; loop syntax is as follows:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;for(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;initialization&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt; &lt;b&gt;test&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt; &lt;b&gt;increment&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;){&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt;block of statements&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;for&lt;/span&gt; loop has three arguments separated by two semicolons.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 1.&lt;/span&gt; The first argument, the counter, is initialized. &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 1.&lt;/span&gt; is executed only once at the beginning of the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; statement.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 2.&lt;/span&gt; The second argument, the test, is evaluated. If the test evaluates to true, the block of statements are executed; otherwise the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; loop is terminated.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 3.&lt;/span&gt; After the block of statements, enclosed by the curly braces, are executed, the counter is incremented by the third argument and &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 2.&lt;/span&gt;&quot; is repeated.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Perl loops through &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 2.&lt;/span&gt;&quot; and &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 3.&lt;/span&gt;&quot; until the test expression is false and the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for&lt;/span&gt; loop is terminated.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If the test expression is never false, you have an infinite loop which can be stopped by pressing Ctrl+c.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Here is a code snippet to print a message 10 times.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;for($counter = 1; $counter &amp;lt;= 10; $counter++){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;print &quot;for loop #$counter\n&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 1.&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$counter&lt;/span&gt;&amp;nbsp;is initialized to 1.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 2.&lt;/span&gt; Perl checks to see if the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$counter&lt;/span&gt; is less than or equal to 10. &amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$counter&lt;/span&gt; is 1; the test is true therefore, Perl executes the code inside the block.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 3.&lt;/span&gt; Perl increases &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$counter&lt;/span&gt; by 1.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The process continues looping through &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 2.&lt;/span&gt;&quot; and &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Step 3.&lt;/span&gt;&quot; until &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$counter&lt;/span&gt; is equal to 11 at which time the test is false.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$counter&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;b&gt;is no longer less than or equal to 10; therefore, the loop exits, after t&lt;/b&gt;&lt;/span&gt;&lt;b&gt;he code block has executed 10 times.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;II. &amp;nbsp;PERL FOR LOOP SOURCE CODE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;You can initialize the counter outside the loop, and increment the control variable inside the block as shown by the following example.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Copy paste the following into your text editor.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;
&lt;b&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Unicode&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use utf8;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: lime;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;use warnings;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#enables -w flag.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: purple;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Forces you to use my() function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;use strict;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#stack trace&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;use Carp ();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;my($file) = &quot;C:/Strawberry/forLoop.pl&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Open the file and read data.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Die with grace if it fails.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;my($counter) = 1;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;for(; $counter &amp;lt;= 10;){&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;print &quot;for loop #$counter\n&quot;;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$counter++;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Close the file.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;close FILE;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;From your text editor, &quot;File Save As&quot; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;forLoop.pl&lt;/span&gt; using the path to the folder of your Perl download.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;From the Perl prompt type the following:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\forLoop.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Enter&lt;/span&gt; and the following will display on your screen:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\Strawberry\forLoop.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #2&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #4&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #5&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #6&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #7&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #8&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #9&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;for loop #10&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;for&lt;/span&gt;&amp;nbsp;loop.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/in-this-tutorial-you-will-learn-how-to.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-3963820892573514736</guid><pubDate>Fri, 18 Nov 2011 05:07:00 +0000</pubDate><atom:updated>2013-03-03T21:29:25.656-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">block</category><category domain="http://www.blogger.com/atom/ns#">double-precision floating point values</category><category domain="http://www.blogger.com/atom/ns#">empty string</category><category domain="http://www.blogger.com/atom/ns#">interpolation</category><category domain="http://www.blogger.com/atom/ns#">logical comparison</category><category domain="http://www.blogger.com/atom/ns#">Perl</category><category domain="http://www.blogger.com/atom/ns#">string</category><category domain="http://www.blogger.com/atom/ns#">undefined</category><category domain="http://www.blogger.com/atom/ns#">zero string</category><title>PERL IF STATEMENT</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL IF STATEMENT&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; &amp;nbsp;&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use the Perl&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;, and&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else&lt;/span&gt;&quot; s&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;tatements&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;to write simple logic in your Perl scripts&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I.&amp;nbsp;&amp;nbsp;PERL QUICK REVIEW&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Before we introduce something new, we will have a quick review:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;A.&amp;nbsp;&amp;nbsp;CALCULATIONS&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Perl uses double-precision floating point values for calculations.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;B.&amp;nbsp;&amp;nbsp;STRING&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Perl defines string as a sequence of characters.&amp;nbsp;&amp;nbsp;The shortest string is the null string it contains no characters.&amp;nbsp;&amp;nbsp;The longest string is only limited by the available memory of your computer.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C.&amp;nbsp;&amp;nbsp;INTERPOLATION&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Interpolation of scalar variables is a mechanism to convert a scalar variable inside a string into string.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;D.&amp;nbsp;&amp;nbsp;BLOCK&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Perl groups statements into blocks of code. &amp;nbsp;A block is surrounded by a pair of (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;{ }&lt;/span&gt;) curly braces and can be nested within a block.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;E.&amp;nbsp;&amp;nbsp;LOGICAL COMPARISON&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;In Perl, everything is true except the number zero &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;0&lt;/span&gt;, empty string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&quot;&lt;/span&gt;, zero string &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;0&lt;/span&gt;&quot;, and undefined (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;undef&lt;/span&gt;) values.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;II. &amp;nbsp;&amp;nbsp;PERL &quot;IF&quot; CONTROL STRUCTURE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Decision statements use the &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;&quot; keyword to execute a statement block depending on the evaluation of conditional expressions. &amp;nbsp;Therefore, you can use the Perl &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;&quot; control structure to write simple logic in your code.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;The &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;&quot; control structure can be nested.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;The syntax of an &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;&quot; control structure is as follows:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if(&lt;/span&gt;condition&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If the condition is true the statements inside the block will be executed: for example:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$x = 1;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$y = 1;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if($x == $y){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;print &quot;$x is equal to $y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The first and second lines define two variables &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$x&lt;/span&gt; and &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$y&lt;/span&gt; with their values initialized to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;1&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;In the fourth line we use the &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt; &quot;statement to print a message if &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$x&lt;/span&gt; is equal to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$y&lt;/span&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The message is only printed if the expression &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;($x == $y)&lt;/span&gt; is evaluated as true.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;III. &amp;nbsp;&amp;nbsp;PERL &quot;IF-ELSE&quot; CONTROL STRUCTURE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If you need an alternative choice, Perl provides an &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if-else&lt;/span&gt;&quot; control structure as follows:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if(&lt;/span&gt;condition&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;if-statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;else-statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If the condition is false the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else&lt;/span&gt;-statements will be executed; for example:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$x = 2;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$y = 3;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if($x == $y){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;print &quot;x is equal to y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;print &quot;x is not equal to y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;IV. &amp;nbsp;&amp;nbsp;PERL &quot;IF-ELSE-IF&quot; CONTROL STRUCTURE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;A.  MULTIPLE CHOICES&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Perl also provides an &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if-else-if&lt;/span&gt;&quot; control structure to make multiple choices based on conditions.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if(&lt;/span&gt;condition1&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;if-statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else if(&lt;/span&gt;condition2&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;else if-statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else if(&lt;/span&gt;condition3&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;else if-statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;...&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;else-statements&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Here is the source code example:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$x = 2;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$y = 3;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if($x &amp;gt; $y){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;print &quot;x is greater than y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else if ($x &amp;lt; $y){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;print &quot;x is less than y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp; &amp;nbsp;print &quot;x is equal to y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;/b&gt;

&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;B.  READABILITY&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Perl helps you create a self documenting style of easy to read code.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;A year after you write a program you should be able to read and understand what you wrote.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The following is another way to format your Perl code:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if (&lt;/span&gt;&lt;/b&gt;&lt;b&gt;condition1&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;task&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;} elsif (&lt;/span&gt;&lt;/b&gt;&lt;b&gt;condition2&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a different task&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;} else {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a task if all else fails&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;V. &amp;nbsp;&amp;nbsp;PERL SCRIPT SOURCE CODE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Copy paste the following into your text editor. &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Unicode&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use utf8;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;use warnings;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#enables -w flag.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Forces you to use my() function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use strict;&lt;/span&gt;&lt;/b&gt; &lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div&gt;
&amp;nbsp; &lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#stack trace&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;use Carp ();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;my($file) = &quot;C:/Strawberry/ifElse.pl&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Open the file and read data.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Die with grace if it fails.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;my($x) = 2;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;my($y) = 3;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;if($x == $y){&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;print &quot;x is equal to y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;else{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;print &quot;x is not equal to y&quot;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Close the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;From your text editor, &quot;File Save As&quot;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;ifElse.pl&lt;/span&gt; using the path to the folder of your Perl download.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;From the Perl prompt type the following:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;C:\Strawberry\&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;ifElse.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press Enter and the following will display on your screen:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;C:\WINDOWS\system32&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;C:\Strawberry\&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;ifElse.pl&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;x is not equal to y&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: blue;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my( )&lt;/span&gt; function makes the variables local to the main package. &amp;nbsp;Packages are classes.&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;A running Perl program has a built-in namespace called &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;main&lt;/span&gt;&quot;, which is the default name. &amp;nbsp;For example, a subroutine called &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Sub1&lt;/span&gt; can be called as &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Sub1( )&lt;/span&gt; or &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;main::Sub1( )&lt;/span&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;With a variable the appropriate sigil is placed in front of the namespace;&amp;nbsp;so a scalar variable called &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$var1&lt;/span&gt; can also be referred to as &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$main::var1&lt;/span&gt;, or even &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$::var1&lt;/span&gt;. &amp;nbsp;Other namespaces can be created at any time.
&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Now you have a &quot;learning feed-back loop.&quot; &amp;nbsp;Change the values of &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$x&lt;/span&gt; and &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$y&lt;/span&gt;. &amp;nbsp;Think about what you expect Perl will do. &amp;nbsp;Then run the program and see if Perl does what you expect.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If pearl does not do what you expect, look at your code and make the appropriate changes, then rerun the program.&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use the Perl &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;if&lt;/span&gt;, and &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;else&lt;/span&gt;&quot; statements to write simple logic in your Perl scripts.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-source-code-examples.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-954768976274132345</guid><pubDate>Fri, 11 Nov 2011 20:44:00 +0000</pubDate><atom:updated>2013-03-03T21:30:47.533-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">complex string comparisons</category><category domain="http://www.blogger.com/atom/ns#">complex string replacements</category><category domain="http://www.blogger.com/atom/ns#">complex string selections</category><category domain="http://www.blogger.com/atom/ns#">parsing</category><category domain="http://www.blogger.com/atom/ns#">Perl</category><category domain="http://www.blogger.com/atom/ns#">REGEX</category><category domain="http://www.blogger.com/atom/ns#">regular expressions</category><category domain="http://www.blogger.com/atom/ns#">syntax</category><title>PERL REGEX REGULAR EXPRESSIONS</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL REGEX REGULAR EXPRESSIONS&lt;/title&gt;


&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to use Perl REGEX, regular expressions.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I.&amp;nbsp;&amp;nbsp;REGEX&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;In its simplest form, a regular expression is just a word or phrase to search for.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;REGEX&lt;/span&gt; are Perl &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;REG&lt;/span&gt;ular &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;EX&lt;/span&gt;pressions. &amp;nbsp;Perl REGEX syntax make it easy to do the following:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;Complex string comparisons.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Complex string selections.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Complex string replacements.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Parsing based on the above abilities.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;A.&amp;nbsp;&amp;nbsp;COMPLEX STRING COMPARISONS&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1.&amp;nbsp;&amp;nbsp;The following is a very basic string logical comparison:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;sought_text&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;The above returns true if the string $string contains substring &quot;sought_text&quot;, and false otherwise.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;2.&amp;nbsp;&amp;nbsp;If you only&amp;nbsp;&lt;/b&gt;&lt;b&gt;want&amp;nbsp;&lt;/b&gt;&lt;b&gt;the strings where the sought_text appears at the&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&quot;&lt;/b&gt;&lt;b&gt;very beginning&quot; of&amp;nbsp;&lt;/b&gt;&lt;b&gt;$string&lt;/b&gt;&lt;b&gt;, write:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt; m&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&lt;/span&gt;sought_text&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3.&amp;nbsp;&amp;nbsp;The &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$&lt;/span&gt; operator indicates &quot;end of string&quot;. If you want to find out if the sought_text is the very last text in the $string, write:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;sought_text&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4.&amp;nbsp;&amp;nbsp;If you want the comparison to be true only if $string contains the sought_text and nothing but the sought_text, write:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&lt;/span&gt;sought_text&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;5.&amp;nbsp;&amp;nbsp;If you want the comparison to be case insensitive add the letter &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;i&lt;/span&gt; after the ending delimiter:&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt; m&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&lt;/span&gt;sought_text&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;i&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;6.&amp;nbsp;&amp;nbsp;Wild Cards&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&amp;nbsp;Match any character&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\w&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match &quot;word&quot; character alphanumeric, plus &quot;_&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\W&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match non-word character&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\s&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match whitespace character&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\S&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match non-whitespace character&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\d&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match digit character&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\D&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match non-digit character&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\t&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match tab&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\n&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match newline&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\r&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match return&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\f&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match formfeed&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\a&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match alarm bell, beep, etc.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\e&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match escape&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\021&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match octal char 21&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;\xf0&lt;/span&gt;&amp;nbsp;&amp;nbsp;Match hex char f0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;7.&amp;nbsp;&amp;nbsp;Repetition&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;*&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match 0 or more times&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;+&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Match 1 or more times&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;?&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match 1 or 0 times&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;{n}&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match exactly n times&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;{n,}&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Match at least n times&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;{n,m}&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Match at least n but not more than m times&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;8.&amp;nbsp;&amp;nbsp;Using Groups &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;(&amp;nbsp;)&lt;/span&gt; in Matching&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Groups are regular expression characters surrounded by parentheses&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;(&amp;nbsp;)&lt;/span&gt;&lt;/b&gt;&lt;b&gt;.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;a.&amp;nbsp;&amp;nbsp;Groups are used to allow alternative phrases&lt;/b&gt;&lt;b&gt;; e.g.:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;/&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;(&lt;/span&gt;Jack|Jill|Hill&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;)&lt;/span&gt;/i&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;For single character alternatives, use character classes &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&amp;nbsp;]&lt;/span&gt;.&amp;nbsp;&amp;nbsp;Everything inside the brackets represents one character, listing all its alternative possibilities.&amp;nbsp;&amp;nbsp;Character classes are alternative single characters within square brackets &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&amp;nbsp;]&lt;/span&gt;.&amp;nbsp;&amp;nbsp;There are two commonly used special characters inside the square brackets:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;A hyphen (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;-&lt;/span&gt;) is used to indicate all characters in the colating sequence between the character on the hyphen&#39;s&amp;nbsp;&lt;/b&gt;&lt;b&gt;(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;-&lt;/span&gt;)&amp;nbsp;&lt;/b&gt;&lt;b&gt;left and the character on&amp;nbsp;&lt;/b&gt;&lt;b&gt;the hyphen&#39;s&amp;nbsp;&lt;/b&gt;&lt;b&gt;(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;-&lt;/span&gt;)&amp;nbsp;&lt;/b&gt;&lt;b&gt;right.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;An uparrow (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&lt;/span&gt;) at immediately following the opening square bracket&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;means &quot;anything but these characters&quot;, and effectively negates the character class.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Character classes have three main advantages:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;i. &amp;nbsp; &amp;nbsp; Shorthand notation, as &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&lt;/span&gt;AEIOUY&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;]&lt;/span&gt; instead of (A|E|I|O|U|Y).&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ii. &amp;nbsp; Character Ranges, such as &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&lt;/span&gt;A&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;-&lt;/span&gt;Z&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;]&lt;/span&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;iii.&amp;nbsp;&amp;nbsp;One to one mapping from one class to another; e.g.: tr/&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&lt;/span&gt;a&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;-&lt;/span&gt;z&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;]&lt;/span&gt;/&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;[&lt;/span&gt;A&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;-&lt;/span&gt;Z&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;]&lt;/span&gt;/.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;b.&amp;nbsp;&amp;nbsp;Groups are also used as a means of retrieving selected text in selection, translation and substitution, used with&amp;nbsp;&lt;/b&gt;&lt;b&gt;scalers;&lt;/b&gt;&lt;b&gt;&amp;nbsp;$1, $2; etc.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;B.&amp;nbsp;&amp;nbsp;COMPLEX STRING SELECTIONS&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Replace every &quot;Jack&quot; with &quot;Jill&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ s/Jack/Jill/;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;C.&amp;nbsp;&amp;nbsp;COMPLEX STRING REPLACEMENTS&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Translations are like substitutions, except they happen on a letter by letter basis instead of substituting a single phrase for another single phrase.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;What if you wanted to make all vowels upper case:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ tr/[a,e,i,o,u,y]/[A,E,I,O,U,Y]/;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Change everything to upper case:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ tr/[a-z]/[A-Z]/;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Change everything to lower case&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ tr/[A-Z]/[a-z]/;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;II.&amp;nbsp;&amp;nbsp;SYMBOLS&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;This operator appears between the string var you are comparing, and the regular expression you are looking for.&amp;nbsp;&amp;nbsp;In selection or substitution a regular expression operates on the string var rather than comparing; for example:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt; m/Jack/;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#return true if var $string contains the name&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt; s/&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;/Jill/;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#replace&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&amp;nbsp;with&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jill&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;!~&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Just like =~, except negated.&amp;nbsp;&amp;nbsp; Returns true if it does not match.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This is the usual &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;delimiter&lt;/span&gt;&quot; for the text part of a regular expression; for example:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ m&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#return true if var $string contains the name&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ s&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Jill&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#replace&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&amp;nbsp;with&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jill&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;If the sought-after text contains slashes, it is easier to use pipe symbols (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;|&lt;/span&gt;) for delimiters.&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;This is the &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;match&lt;/span&gt;&quot; operator. &amp;nbsp;&lt;/b&gt;&lt;b&gt;The match operator comes before the opening delimiter. &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;b&gt;The match operator&lt;/b&gt;&lt;b&gt;&amp;nbsp;means read the string expression on the left of the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;=~&lt;/span&gt;, and see if any part of it matches the expression within the delimiters following the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt;.&amp;nbsp;&amp;nbsp;If the delimiters are slashes (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;/&lt;/span&gt;), the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt; is optional and often not included.&amp;nbsp;&amp;nbsp;Whether t&lt;/b&gt;&lt;b&gt;he match operator&lt;/b&gt;&lt;b&gt;&amp;nbsp;is there or not, it is still a match operation; for example:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;$string =~ &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;m&lt;/span&gt;/&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;/;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#return true if var $string contains the name&amp;nbsp;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$string =~ /&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;/;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#same result as previous statement&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;This is the &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;beginning of line&lt;/span&gt;&quot; symbol.&amp;nbsp;&amp;nbsp;When used immediately after the starting delimiter, it signifies &quot;at the beginning of the line&quot;; for example:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;$string =~ m/&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;^&lt;/span&gt;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;/;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#true only when &quot;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&quot; is the first text in the string&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;This is the &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;end of line&lt;/span&gt;&quot; symbol.&amp;nbsp;&amp;nbsp;When used immediately before the ending delimiter,&amp;nbsp;&lt;/b&gt;&lt;b&gt;the &quot;end of line&quot; symbol&lt;/b&gt;&lt;b&gt;&amp;nbsp;signifies &quot;at the end of the line&quot;; for example:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;$string =~ m/&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$&lt;/span&gt;/;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#true only when &quot;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&quot; is the last text in the string&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;i&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;This is the &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;case insensitivity&lt;/span&gt;&quot; operator when used immediately after the closing delimiter; for example:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;$string =~ m/&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;/&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;i&lt;/span&gt;;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;#true when $string contains &quot;&lt;/b&gt;&lt;b&gt;Jack&lt;/b&gt;&lt;b&gt;&quot; or &quot;jAcK&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;



III.&amp;nbsp;&amp;nbsp;TABLES&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Some characters have a special meaning to the searcher. These characters are called metacharacters.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.blogger.com/blogger.g?blogID=3391828488627720397); background-origin: initial; font-family: Calibri, Helvetica, Arial, sans-serif; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; page-break-after: avoid; text-align: center;&quot;&gt;


















&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: large;&quot;&gt;











METACHARACTERS&lt;/span&gt;&lt;/h2&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: black; font-size: 24px; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;CHAR&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;MEANING&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;circumflex accent&quot;&gt;^&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;beginning of string&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;dollar sign&quot;&gt;$&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;end of string&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;full stop (period)&quot;&gt;.&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;any character except newline&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;asterisk&quot;&gt;*&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;match 0 or more times&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;plus sign&quot;&gt;+&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;match 1 or more times&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;question mark&quot;&gt;?&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;match 0 or 1 times;&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial;&quot;&gt;or&lt;/em&gt;: shortest match&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;vertical line (vertical bar)&quot;&gt;|&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;alternative&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;left parenthesis&quot;&gt;(&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://www.cs.tut.fi/~jkorpela/latin1/3.html#29&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;right parenthesis&quot;&gt;)&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;grouping; “storing”&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;left square bracket&quot;&gt;[&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;right square bracket&quot;&gt;]&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;set of characters&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;left curly bracket (left brace)&quot;&gt;{&lt;/a&gt;&amp;nbsp;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;right curly bracket (right brace)&quot;&gt;}&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;repetition modifier&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th&gt;&lt;big&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 29px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3391828488627720397&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0000af; text-decoration: none;&quot; title=&quot;reverse solidus (backslash)&quot;&gt;\&lt;/a&gt;&lt;/code&gt;&lt;/big&gt;&lt;/th&gt;&lt;td&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;quote or special&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: url(http://www.blogger.com/blogger.g?blogID=3391828488627720397); background-origin: initial; font-family: Calibri, Helvetica, Arial, sans-serif; font-size: 36px; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; page-break-after: avoid; text-align: center;&quot;&gt;


















&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;











REPETITION&lt;/span&gt;&lt;/h2&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: black; font-size: 24px;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;font-size: 29px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;*&lt;/code&gt;&lt;br /&gt;
zero or more&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;’s&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;+&lt;/code&gt;&lt;br /&gt;
one or more&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;’s&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;?&lt;/code&gt;&lt;br /&gt;
zero or one&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;’s (i.e., optional&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;)&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;{&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;m&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;}&lt;/code&gt;&lt;br /&gt;
exactly&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;m&lt;/var&gt;&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;’s&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;{&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;m&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;,}&lt;/code&gt;&lt;br /&gt;
at least&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;m&lt;/var&gt;&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;’s&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;{&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;m&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;,&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;n&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;}&lt;/code&gt;&lt;br /&gt;
at least&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;m&lt;/var&gt;&amp;nbsp;but at most&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;n&amp;nbsp;&lt;/var&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;a&lt;/var&gt;’s&lt;br /&gt;
&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;repetition&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;?&lt;/code&gt;&lt;br /&gt;
same as&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;repetition&lt;/var&gt;&amp;nbsp;but the&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;shortest&lt;/em&gt;match is taken&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif; font-size: large;&quot;&gt;SPECIAL NOTATIONS WITH \&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;
&lt;/b&gt;
&lt;br /&gt;
&lt;table style=&quot;background-color: white; color: black; font-size: 24px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;&lt;caption style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: none; background-origin: initial; font-weight: bold;&quot;&gt;Single characters&lt;/caption&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\t&lt;/code&gt;&lt;/td&gt;&lt;td&gt;tab&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\n&lt;/code&gt;&lt;/td&gt;&lt;td&gt;newline&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\r&lt;/code&gt;&lt;/td&gt;&lt;td&gt;return (CR)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\x&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;hh&lt;/var&gt;&lt;/td&gt;&lt;td&gt;character with hex. code&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;hh&lt;/var&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot;&gt;&lt;caption style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: none; background-origin: initial; font-weight: bold;&quot;&gt;“Zero-width assertions”&lt;/caption&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\b&lt;/code&gt;&lt;/td&gt;&lt;td&gt;“word” boundary&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\B&lt;/code&gt;&lt;/td&gt;&lt;td&gt;not a “word” boundary&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: black; font-size: 24px;&quot;&gt;&lt;caption style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: none; background-origin: initial; font-weight: bold;&quot;&gt;Matching&lt;/caption&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\w&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;single&lt;/em&gt;&amp;nbsp;character classified as a “word” character (alphanumeric or “&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;_&lt;/code&gt;”)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\W&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any non-“word” character&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\s&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any whitespace character (space, tab, newline)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\S&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any non-whitespace character&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\d&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any digit character, equiv. to&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[0-9]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\D&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any non-digit character&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b style=&quot;color: red; font-size: x-large;&quot;&gt;CHARACTER CLASS &lt;/b&gt;&lt;b style=&quot;font-size: x-large;&quot;&gt;[&lt;/b&gt;&lt;b style=&quot;color: red; font-size: x-large;&quot;&gt;...&lt;/b&gt;&lt;b style=&quot;font-size: x-large;&quot;&gt;]&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 24px; margin-bottom: 1.1em; margin-top: 0.3em; orphans: 3; text-align: -webkit-auto; widows: 3;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;warning&quot; style=&quot;background-color: white; color: blue;&quot;&gt;Inside a &quot;character class&quot; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;denoted by&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;...&lt;/span&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;]&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;the&amp;nbsp;following rules apply:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: black; font-size: 24px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;characters&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any of the characters in the sequence&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;x&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;-&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;y&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any of the characters from&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;x&lt;/var&gt;&amp;nbsp;to&amp;nbsp;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;y&lt;/var&gt;&amp;nbsp;(inclusively) in the ASCII code&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6e380a;&quot;&gt;\-&lt;/span&gt;&lt;b&gt;]&lt;/b&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches the hyphen character&amp;nbsp;“&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;-&lt;/code&gt;”&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;[&lt;/b&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\n&lt;/code&gt;&lt;b&gt;]&lt;/b&gt;&lt;/td&gt;&lt;td&gt;matches the newline; other&amp;nbsp;single character denotations with \&amp;nbsp;apply normally, too&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6e380a;&quot;&gt;^&lt;/span&gt;&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;something&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;matches any character&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;except&lt;/em&gt;&amp;nbsp;those that&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[&lt;/code&gt;&lt;var style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #006600;&quot;&gt;something&lt;/var&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;]&lt;/code&gt;&amp;nbsp;denotes; that is, immediately after the leading “&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[&lt;/code&gt;”, the circumflex “&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;^&lt;/code&gt;” means “not” applied to all of the rest&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-origin: initial; font-family: Calibri, Helvetica, Arial, sans-serif; font-size: 36px; font-weight: normal; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; page-break-after: avoid; text-align: center;&quot;&gt;






























&lt;/h2&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;background-color: white; color: black; font-size: 24px;&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;left&quot;&gt;&lt;th&gt;EXPRESSION&lt;/th&gt;&lt;th&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
MATCHES&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&amp;nbsp;(that exact character sequence, but anywhere in the string)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;^abc&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&amp;nbsp;at the&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;beginning&lt;/em&gt;&amp;nbsp;of the string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc$&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&amp;nbsp;at the&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;end&lt;/em&gt;&amp;nbsp;of the string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a|b&lt;/code&gt;&lt;/td&gt;&lt;td&gt;either of&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;^abc|abc$&lt;/code&gt;&lt;/td&gt;&lt;td&gt;the string&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&amp;nbsp;at the beginning or at the end of the string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ab{2,4}c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;an&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;followed by two, three or four&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;’s followed by a&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ab{2,}c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;an&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;followed by at least two&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;’s followed by a&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ab*c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;an&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;followed by any number (zero or more) of&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;’s followed by a&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ab+c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;an&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;followed by one or more&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;’s followed by a&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ab?c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;an&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;followed by an optional&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;&amp;nbsp;followed by a&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;; that is, either&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ac&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a.c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;an&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;&amp;nbsp;followed by any single character (not newline) followed by a&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a\.c&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a.c&lt;/code&gt;&amp;nbsp;exactly&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[abc]&lt;/code&gt;&lt;/td&gt;&lt;td&gt;any one of&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[Aa]bc&lt;/code&gt;&lt;/td&gt;&lt;td&gt;either of&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;Abc&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[abc]+&lt;/code&gt;&lt;/td&gt;&lt;td&gt;any (nonempty) string of&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;’s,&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;’s and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c’s&lt;/code&gt;&amp;nbsp;(such as&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abba&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;acbabcacaa&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;[^abc]+&lt;/code&gt;&lt;/td&gt;&lt;td&gt;any (nonempty) string which does&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;not&lt;/em&gt;&amp;nbsp;contain any of&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;a&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;b&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;c&lt;/code&gt;&amp;nbsp;(such as&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;defg&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\d\d&lt;/code&gt;&lt;/td&gt;&lt;td&gt;any two decimal digits, such as&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;25&lt;/code&gt;; same as \d{2}&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;\w+&lt;/code&gt;&lt;/td&gt;&lt;td&gt;a “word”: a nonempty sequence of alphanumeric characters and low lines (underscores), such as&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;cp3o&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;r2d2&lt;/code&gt;&amp;nbsp;and c&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;ool_1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;100\s*mk&lt;/code&gt;&lt;/td&gt;&lt;td&gt;the strings&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;100&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;mk&lt;/code&gt;&amp;nbsp;optionally separated by any amount of white space (spaces, tabs, newlines)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc\b&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc&lt;/code&gt;&amp;nbsp;when followed by a word boundary (e.g. in&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abc!&lt;/code&gt;&amp;nbsp;but not in&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;abcd&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;perl\B&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;perl&lt;/code&gt;&amp;nbsp;when&amp;nbsp;&lt;em style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #400000;&quot;&gt;not&lt;/em&gt;&amp;nbsp;followed by a word boundary (e.g. in&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;perlert&lt;/code&gt;&amp;nbsp;but not in&amp;nbsp;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #6e380a; font-family: Cambria, Garamond, &#39;Palatino Linotype&#39;, serif; font-size: 24px;&quot;&gt;perl stuff&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to use Perl REGEX, regular expressions.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &amp;nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/regex-regular-expressions.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-6391983837856598429</guid><pubDate>Tue, 08 Nov 2011 09:28:00 +0000</pubDate><atom:updated>2013-03-03T21:33:26.879-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">file input</category><category domain="http://www.blogger.com/atom/ns#">file output</category><category domain="http://www.blogger.com/atom/ns#">line-at-a-time sequential input</category><category domain="http://www.blogger.com/atom/ns#">Perl</category><category domain="http://www.blogger.com/atom/ns#">source code examples</category><category domain="http://www.blogger.com/atom/ns#">strawberry perl</category><title>WRITING AND READING PERL 5 SCRIPT</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;WRITING AND READING PERL 5 SCRIPT&lt;/title&gt;

&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; 
&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn how to write and read Perl 5 script.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;PERL 5 FILE OUTPUT AND &amp;nbsp;FILE INPUT SOURCE CODE &amp;nbsp;EXAMPLES&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Perl&#39;s strengths are in text manipulation and parsing; therefore, Perl &amp;nbsp;5 has complete file input and output capabilities, especially syntax for line-at-a-time sequential input.&lt;/b&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;A.  PERL 5 FILE OUTPUT SOURCE CODE EXAMPLE&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;Copy Paste&quot; the following Perl 5 program into your text editor:&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Unicode&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;use utf8;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Provides undefined value warnings.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;use warnings;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#enables -w flag.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;use diagnostics;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Helps you catch typos.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Forces you to use my() function to declare all variables.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#my variables (lexical variables) are faster than globals.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;use strict;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Stack trace.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;use Carp ();&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;nbsp; local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;open STDOUT, &quot;&amp;gt;c:/strawberry/mary.txt&quot;; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;print &quot;Mary had a little lamb.\n&quot;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;print &quot;Its fleas were white as snow.\n&quot;;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;print &quot;And every where that Mary went,\n&quot;; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;print &quot;the fleas were sure to go.\n&quot;;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: purple;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;close STDOUT;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;File Save As&quot;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;writeMary.pl&amp;nbsp;&lt;/span&gt;using the path of the Perl 5 download; e.g.:&lt;/span&gt;&lt;/b&gt;

&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;c:\strawberry\&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;writeMary.pl&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Open Perl 5, depending on your platform you will have a Perl 5 prompt similar to the following:&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;From the above Perl 5 prompt type:&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;c:\strawberry\writeMary.pl&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Press&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;Enter&lt;/span&gt;.&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Perl 5 will display the following on your Perl 5 prompt:&lt;/span&gt;&lt;/b&gt;

&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If you were expecting to see the poem display on the Perl 5 prompt screen, surprise!&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Lets examine the code line by line and see what happened to our poem.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;Line 19:&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt; &amp;nbsp;open &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;STDOUT&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&quot;&amp;gt;c:/strawberry/mary.txt&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;Our&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt; open&lt;/span&gt;&amp;nbsp;has two arguments: &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;The first argument is a filehandle, in this example the filehandle is STDOUT. &lt;/span&gt;The two arguments are separated by a comma. &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;The second argument is a single string comprising &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;how to open it, the path, and&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;what to open.&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;If the &quot;expression&quot; begins with &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&amp;gt;&lt;/span&gt;&quot;, as ours does, the file is opened for output. &amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;When you name a file in an &quot;open for writing&quot; statement, as we have done, the file may or may not exist before opening. If it does exist, first it is wiped clean as soon as it&#39;s opened. If it does not exist, first it is created with no contents. &amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;mary.txt&lt;/span&gt; &amp;nbsp;does not exist; therefore, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;mary.txt&lt;/span&gt; is created with no contents. &amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open&lt;/span&gt;&amp;nbsp;returns &lt;span style=&quot;color: magenta;&quot;&gt;true&lt;/span&gt; when it works, and &lt;span style=&quot;color: magenta;&quot;&gt;false&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;when it fails.&lt;/b&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;A print statement sends output to&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;by default. &amp;nbsp;You can specify the file you want to use by opening a filehandle to it. Then you use the new filehandle in your print statement, instead of the default&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;filehandle. There is no comma after the filehandle in the print statement. &amp;nbsp;You can name a filehandle anything you like. &amp;nbsp;By convention, a filehandle is written in upper case, but it does not have to be.&lt;/b&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;Since a&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;print statement sends output to&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;by default we did not have to write lines 2-5 as shown below&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;. &amp;nbsp;However, if you change the program it will work because both are the same.&lt;/b&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Line 20:&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;Mary had a little lamb.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Line 21:&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;Its fleas were white as snow.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Line 22:&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;And every where that Mary went,&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Line 23:&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;STDOUT&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;the fleas were sure to go.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;When you&#39;re finished, you close the filehandle as shown below.&lt;/b&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Line 24:&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: inherit;&quot;&gt;close STDOUT;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;In summary, we created a file, which we opened for output, named&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;mary.txt &lt;/span&gt;located at path&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:/strawberry/ &lt;/span&gt;then we wrote our poem to that file and closed that file. &amp;nbsp;That is why it did not appear displayed on the Perl 5 prompt screen.&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;B. PERL 5 FILE INPUT SOURCE CODE EXAMPLE&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;Copy Paste&quot; the following Perl 5 program into your text editor:&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;

&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Unicode&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use utf8;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Provides undefined value warnings.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use warnings;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#enables -w flag.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use diagnostics;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Helps you catch typos.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Forces you to use my() function to declare all variables.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#my variables (lexical variables) are faster than globals.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use strict;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Stack trace.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use Carp ();&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;local $SIG{__WARN__} = \&amp;amp;Carp::confess;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Specify the file&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my $file = &quot;c:/strawberry/mary.txt&quot;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Open the file and read data&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: lime;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;#Die with grace if it fails&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my @lines = &amp;lt;FILE&amp;gt;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print @lines;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;File Save As&quot; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;readMary.pl&lt;/span&gt; using the path of the Perl 5 download; e.g.:

&lt;br /&gt;&lt;br /&gt;

&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;c:\strawberry\readMary.pl &lt;/span&gt;

&lt;br /&gt;&lt;br /&gt;From the Perl 5 prompt type the following:

&lt;br /&gt;&lt;br /&gt;

&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-size: xx-small;&quot;&gt;c:\strawberry\readMary.pl&lt;/span&gt;

&lt;br /&gt;&lt;br /&gt;

Press Enter and the following will display on your screen:&lt;/span&gt;

&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;C:\WINDOWS\system32&amp;gt;c:\strawberry\readMary.pl&lt;/span&gt;&amp;nbsp;&lt;/span&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;Mary had a little lamb.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;Its fleas were white as snow.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;And every where that Mary went,&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-family: Verdana, sans-serif;&quot;&gt;the fleas were sure to go.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: xx-small;&quot;&gt;C:\WINDOWS\system32&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Lets examine the code line by line and see what happened to our poem.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Line 19: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif;&quot;&gt;#Specify the file.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Line 20: &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$file = &quot;c:/strawberry/mary.txt&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As the comment in Line 1: states, Line 2: specifies the file by assigning &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;&quot;c:/strawberry/mary.txt&quot;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;to &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;$file&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As shown below, the file &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$FILE&lt;/span&gt;&amp;nbsp;is opened or if the file can not be opened an error message is displayed on the screen.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 21: &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Open the file and read data&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 22: &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;#Die with grace if it fails&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Line 23: &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;open (FILE, &quot;&amp;lt;$file&quot;) or die &quot;Can&#39;t open $file: $!\n&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;Our&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;nbsp;open&lt;/span&gt;&amp;nbsp;has two arguments:&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;The first argument is a filehandle, in this example the filehandle is FILE.&amp;nbsp;&lt;/span&gt;The two arguments are separated by a comma. &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;The second argument is a single string comprising&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;how to open it, the path, and&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;what to open.&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;If the &quot;expression&quot; begins with &quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&amp;lt;&lt;/span&gt;&quot;, as ours does, the file is opened for input, reading. &amp;nbsp;&lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;When you name a file in an &quot;open for reading&quot; statement, as we have done, the file may or may not exist before opening. If it does exist it&#39;s opened. &lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open&lt;/span&gt;&amp;nbsp;returns &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;true&lt;/span&gt; when it works, and &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;false&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif; text-align: justify;&quot;&gt;when it fails. If our &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;open&lt;/span&gt; had failed the condition would have been &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;false&lt;/span&gt; and the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;or&lt;/span&gt; would have printed both the error message &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&quot;Can&#39;t open $file:&lt;/span&gt; and the appropriate system error message provided by &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$!&lt;/span&gt;.&lt;/b&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As shown below the file is read into the array &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@lines&lt;/span&gt;.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 24: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Read the file into the array @lines.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 25: &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;my&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;@lines = &amp;lt;FILE&amp;gt;;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;print&lt;/span&gt; displays the poem on the screen.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 26: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Print the file to the screen.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 27: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;print @lines;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;We are done! Therefore, as shown below, the file is closed.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 28: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;#Close the file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;Line 29: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;close FILE;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;C. PERL 5 FILE INPUT OUTPUT SUMMARY&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;MODE&lt;/span&gt;&lt;/th&gt;
&lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;DESCRIPTION&lt;/span&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;+&amp;lt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;READ,WRITE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;+&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;READ,WRITE,TRUNCATE,CREATE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;+&amp;gt;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;READ,WRITE,CREATE,APPEND&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned how to write and read Perl 5 script.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px; text-align: left;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
&lt;/div&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt; 
&lt;/span&gt;&lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/free-perl-source-code-examples.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3391828488627720397.post-5052519675557205925</guid><pubDate>Tue, 08 Nov 2011 09:25:00 +0000</pubDate><atom:updated>2013-03-03T21:35:39.318-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">arguments</category><category domain="http://www.blogger.com/atom/ns#">array</category><category domain="http://www.blogger.com/atom/ns#">array elements</category><category domain="http://www.blogger.com/atom/ns#">C</category><category domain="http://www.blogger.com/atom/ns#">data table</category><category domain="http://www.blogger.com/atom/ns#">de-referencing</category><category domain="http://www.blogger.com/atom/ns#">element</category><category domain="http://www.blogger.com/atom/ns#">fields</category><category domain="http://www.blogger.com/atom/ns#">hash</category><category domain="http://www.blogger.com/atom/ns#">hash elements</category><category domain="http://www.blogger.com/atom/ns#">instantiating</category><category domain="http://www.blogger.com/atom/ns#">list</category><category domain="http://www.blogger.com/atom/ns#">object</category><category domain="http://www.blogger.com/atom/ns#">Perl</category><category domain="http://www.blogger.com/atom/ns#">records</category><category domain="http://www.blogger.com/atom/ns#">referencing</category><category domain="http://www.blogger.com/atom/ns#">scalar</category><category domain="http://www.blogger.com/atom/ns#">subroutines</category><title>PERL 5 SUBROUTINE</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;title&gt;PERL 5 SUBROUTINE&lt;/title&gt;

&lt;br /&gt;
&lt;div class=&quot;g-plusone&quot; data-annotation=&quot;inline&quot; data-width=&quot;300&quot;&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  (function() {
    var po = document.createElement(&#39;script&#39;); po.type = &#39;text/javascript&#39;; po.async = true;
    po.src = &#39;https://apis.google.com/js/plusone.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(po, s);
  })();
&lt;/script&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt; &lt;/form&gt;
&lt;/div&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;REVISED: Sunday, March 3, 2013&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: 800;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; imageanchor=&quot;1&quot; style=&quot;font-weight: bold; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s1600/avatar.gif&quot; /&gt;&lt;/a&gt; 

&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You will learn the basic fundamentals of the Perl 5 subroutine.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;I. &amp;nbsp;&amp;nbsp;PERL 5 SUBROUTINE INTRODUCTION&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;A.&amp;nbsp;&amp;nbsp;PERL 5 SUBROUTINES&lt;/span&gt;&lt;/b&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Perl 5 subroutines are user-defined functions.&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Subroutines allow you to reuse blocks of code in a program over and over again.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Subroutine definitions can be anywhere in a Perl 5 program.&amp;nbsp;&amp;nbsp; However, you should pick a location and consistently place them in that location; e.g., either at the beginning or end of your program.&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Subroutine definitions are global;&amp;nbsp;they are accessible from every part of your program.&amp;nbsp;&lt;/b&gt;&lt;b&gt;A Perl 5 subroutine can return any kind of value. &amp;nbsp;&lt;/b&gt;&lt;b&gt;When creating a subroutine definition you can use a return statement but you do not have to.&amp;nbsp;&amp;nbsp; If you do not use a return statement, the return value of the subroutine is the value of the last statement executed.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A subroutine name begins with an ampersand (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;amp;&lt;/span&gt;) and consists of letters, digits, and underscores, but can not start with a digit.&amp;nbsp;&amp;nbsp;You use the subroutine name, with the prefix ampersand (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;amp;&lt;/span&gt;) from within an expression, to invoke or call the subroutine. &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Any time you call a subroutine, you implicitly call a subroutine which is inside the current package.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To define a subroutine, use the keyword &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;sub&lt;/span&gt;, the name of the subroutine without the ampersand&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&amp;amp;&lt;/span&gt;)&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;, then an indented block of code in curly braces (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;{}&lt;/span&gt;) which makes up the body of the subroutine. &amp;nbsp;The concept of a block of code is important; therefore, remember the area between the two braces is called a block.&lt;/span&gt;&lt;/b&gt; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/b&gt; &lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;B. &amp;nbsp;PERL 5 MODULE&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A module is similar to a subroutine. &amp;nbsp;The difference is that modules do not live in your program, they are their own separate script outside your code.&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;A&amp;nbsp;module is incorporated into a program with &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use&lt;/span&gt;. &amp;nbsp;You can use as many modules as you like in one program and you can write your own modules.&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Make a new folder within the Perl 5&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;lib&lt;/span&gt; folder; e.g., &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;myModules&lt;/span&gt;. &amp;nbsp;Instead of saving to&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;your new Perl 5&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;lib&lt;/span&gt;&amp;nbsp;folder &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;myModules&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;with a &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;.pl&lt;/span&gt; extension, save with a &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;.pm&lt;/span&gt; extension for Perl Module. &amp;nbsp;To use a module named &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;firstModule.pm&lt;/span&gt; start your script with &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;use myModules::firstModule;&lt;/span&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;C. &amp;nbsp;PERL 5 PACKAGE&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A Perl 5 script (&lt;span style=&quot;color: purple;&quot;&gt;.pl&lt;/span&gt; file) must always contain exactly zero package declarations.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A Perl 5 module (&lt;span style=&quot;color: purple;&quot;&gt;.pm&lt;/span&gt; file) must always contain exactly one package declaration, corresponding exactly to its name and location. For example, module &lt;span style=&quot;color: purple;&quot;&gt;Mathematics/Powers.pm&lt;/span&gt; must begin with package &lt;span style=&quot;color: purple;&quot;&gt;Mathematics::Powers&lt;/span&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;D. &amp;nbsp;PERL 5 ARGUMENTS&lt;/span&gt;&lt;/b&gt;

&lt;br /&gt;
&lt;div style=&quot;font-weight: bold; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;All arguments in Perl 5 are passed by reference.&amp;nbsp;&amp;nbsp;Therefore, it is important to immediately assign the input-only arguments to local variables, and only work on the local variables.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In Perl 5, you can pass only one kind of argument to a subroutine: a scalar.&amp;nbsp;&amp;nbsp;To pass any other kind of argument, you need to convert it to a scalar.&amp;nbsp;&amp;nbsp;You do that by passing a reference to it.&amp;nbsp;&amp;nbsp;A reference to anything is a scalar.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt; &lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif; font-weight: bold;&quot;&gt;E.&amp;nbsp;&amp;nbsp;REFERENCING AND DE-REFERENCING VARIABLES&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;-&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;This operator works the same as it does in C. It means &quot;element so and so of the de-referenced reference&quot;. &amp;nbsp;In-place de-referencing is provided by the &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;-&amp;gt;&lt;/span&gt; operator. Most Perl 5 objects are references to a hash. &amp;nbsp;One typical usage is an object containing a list of hashes. &amp;nbsp;The list of hashes could easily represent a data table,&amp;nbsp;with array elements being &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;rows&lt;/span&gt; (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;records&lt;/span&gt;) and hash elements being &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;columns&lt;/span&gt; (&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;fields&lt;/span&gt;).&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Whenever you call a subroutine, the perl 5 interpreter creates a list of any parameters passed to the subroutine and stores this list in a special version of the variable &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@_&lt;/span&gt; that is usable only by the called subroutine. Arguments to a subroutine are accessible inside the subroutine as list &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@_&lt;/span&gt;. Any change the subroutine performs to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@_&lt;/span&gt; or any of its members like &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$_[0]&lt;/span&gt;, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;$_[1]&lt;/span&gt;, etc, are changes to the original argument. However, assigning &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple;&quot;&gt;@_&lt;/span&gt; or its elements to other variables makes a separate copy. Changes to the separate copy are unknown outside of the subroutine.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The following table discusses the referencing and de-referencing of variables.&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;VARIABLE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;INSTANTIATING&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;THE SCALAR&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;INSTANTIATING&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;REFERENCE TO SCALAR&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;REFERENCING SCALAR&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;DE-REFERENCING SCALAR&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;ACCESSING AN ELEMENT&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;$scalar&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$scalar = &quot;dog&quot;;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref = \&quot;dog&quot;;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref = \$scalar&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$$ref or&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;${$ref}&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;N/A&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;@list&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;@list = (&quot;dog&quot;, &quot;cat&quot;);&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref = [&quot;dog&quot;, &quot;cat&quot;];&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref = \@list&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;@{$ref}&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;${$ref}[3]&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref-&amp;gt;[3]&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;%hash&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;%hash = (&quot;animal&quot; =&amp;gt; &quot;dog&quot;,&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&quot;camel&quot; =&amp;gt; &quot;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; line-height: 22px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Bactrian&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&quot;);&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$hash = {&quot;animal&quot; =&amp;gt; &quot;dog&quot;,&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&quot;camel&quot; =&amp;gt; &quot;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #222222; line-height: 22px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Bactrian&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&quot;};&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref = \%hash&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;%{$ref}&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;${$ref}{&quot;rat&quot;}&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref-&amp;gt;{&quot;rat&quot;}&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;FILE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;/td&gt;       &lt;td valign=&quot;top&quot;&gt;&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;$ref = \*FILE&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;{$ref} or scalar &amp;lt;$ref&amp;gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;F. &amp;nbsp;PERL 5 TWO STRING ARGUMENTS SUBROUTINE EXAMPLE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The following table shows the subroutine syntax for a subroutine with two string arguments:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;       &lt;td colspan=&quot;2&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;TWO STRING ARGUMENTS&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;CALL&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;       &lt;td&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;SUBROUTINE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td&gt;&lt;pre&gt;&lt;b&gt;mysub($filename, $title);&lt;/b&gt;&lt;/pre&gt;
&lt;/td&gt;       &lt;td&gt;&lt;pre&gt;&lt;b&gt;sub mysub($$)
&amp;nbsp; {
&amp;nbsp; }&lt;/b&gt;&lt;/pre&gt;
&lt;/td&gt;     &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;G. &amp;nbsp;PERL 5 SUBROUTINE EXAMPLE&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; line-height: 17px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: purple; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;sub max {

    my($max) = shift(@_);

    foreach my $temp (@_) {

        $max = $temp if $temp &amp;gt; $max;

    }

    return($max);

}&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You have learned the basic fundamentals of the Perl 5 subroutine.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 9px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://goo.gl/qi5jw&quot; style=&quot;color: #33aaff;&quot;&gt;Elcric Otto Circle&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* One */
google_ad_slot = &quot;8813220342&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Two */
google_ad_slot = &quot;8243854886&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
google_ad_client = &quot;ca-pub-4871588942132101&quot;;
/* Three */
google_ad_slot = &quot;7921082405&quot;;
google_ad_width = 336;
google_ad_height = 280;
//&lt;/script&gt;
--&amp;gt; &lt;script src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;form&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;&lt;input onclick=&quot;window.location.href=&#39;http://goo.gl/Hm4Lb&#39;&quot; type=&quot;BUTTON&quot; value=&quot;HOME PAGE&quot; /&gt;  &lt;/span&gt; &lt;/form&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;h1&gt;
How to Link to My Home Page&lt;/h1&gt;
&lt;form action=&quot;http://www.example.com/&quot;&gt;
&lt;label for=&quot;linkcode&quot;&gt;
To link to &quot;MY Home Page&quot; from your website, simply copy and paste the following code into your website HTML page.
&lt;/label&gt;
&lt;textarea cols=&quot;43&quot; id=&quot;linkcode&quot; onclick=&quot;this.focus();this.select();&quot; readonly=&quot;readonly&quot; rows=&quot;5&quot; title=&quot;Select the text here, click your right mouse button, click the Copy menu item, and paste it into your web page in HTML source mode&quot;&gt;&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/textarea&gt;
&lt;/form&gt;
It will appear on your website as:&lt;br /&gt;
&lt;a href=&quot;http://goo.gl/Hm4Lb&quot; target=&quot;_top&quot;&gt;&quot;Link to ELCRIC OTTO CIRCLE&#39;s Home Page&quot;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://perlelcric.blogspot.com/2011/11/perl-parrser.html</link><author>noreply@blogger.com (Ron Tinnel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQLrnGMEYMd_wNUW-j__O6i8KKw50ITeKzILYpYpH7OJyaTX1LptQ-3xoZ2x5Zu21ruC6ZI9mn2SMMaZXGPs2IRMUoJpOA6SMzmpgVH8S2PcGSph_kbI_WrxT9820ppbv0xnp0W0OLVg/s72-c/avatar.gif" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>