<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkYDR3o9fSp7ImA9WhRRFE4.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338</id><updated>2011-11-27T15:56:16.465-08:00</updated><category term="Exporting" /><category term="Introduction" /><category term="Subroutines" /><category term="Usage" /><category term="Issues of Scope with my() and local()" /><category term="Data Structures" /><category term="Associative Arrays" /><category term="Object Oriented Perl" /><category term="Importing and Exporting" /><category term="Loops" /><category term="Logical Operators" /><category term="Regular Expressions" /><category term="Arrays" /><category term="Compound Statements" /><category term="Array Functions (Hash Arrays)" /><category term="Data Types" /><category term="Substitution" /><category term="Meta-Characters" /><category term="Conditional Expressions" /><category term="Backreferences" /><category term="Matching" /><category term="Objects" /><category term="TypeGlobes" /><category term="Labels" /><category term="my()" /><category term="Classes" /><category term="Flow control" /><category term="Methods" /><category term="File Handles" /><category term="Undefined Values" /><category term="Package Constructors and Destructors" /><category term="Special Variables" /><category term="Meta-Sequences" /><category term="Meta-Brackets" /><category term="Garbage Collection" /><category term="Modules" /><category term="Relational Operators" /><category term="Scalars" /><category term="references" /><category term="Destructors" /><category term="local()" /><category term="Array Functions (Scalar Arrays)" /><title>Amazing Perl</title><subtitle type="html">The amazing world of perl for engineers!</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://amazing-perl.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/AmazingPerl" /><feedburner:info uri="amazingperl" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;Ck4HQX4yfCp7ImA9WxNVGEw.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-6019839589276459346</id><published>2009-10-29T03:08:00.001-07:00</published><updated>2009-10-29T03:08:50.094-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-29T03:08:50.094-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Importing and Exporting" /><title>Importing from the ‘Exporter’</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/6019839589276459346/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/10/importing-from-exporter.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/6019839589276459346?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/6019839589276459346?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/K5WKNAcn2AM/importing-from-exporter.html" title="Importing from the ‘Exporter’" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><content type="html">One advantage of the Exporter module is that the import method it provides is well developed and handles many different situations for us. Even if we decide to provide our own import subroutine we may want to use Exporter too, just for the richness of the features it provides. For example, it accepts regular expressions as well as literal symbol names, which means that we can define a collection 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a3n_KEf-kZc_b7e7v6gb809XTvk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a3n_KEf-kZc_b7e7v6gb809XTvk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a3n_KEf-kZc_b7e7v6gb809XTvk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a3n_KEf-kZc_b7e7v6gb809XTvk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/K5WKNAcn2AM" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/10/importing-from-exporter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4BQn8zeip7ImA9WxNVGEw.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-2464840219480175016</id><published>2009-10-29T03:06:00.000-07:00</published><updated>2009-10-29T03:09:13.182-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-29T03:09:13.182-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Exporting" /><title>Exporting</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/2464840219480175016/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/10/exporting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2464840219480175016?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2464840219480175016?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/hOB6c2lJZEk/exporting.html" title="Exporting" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Having examined the import mechanism from the side of the importer, we can take a look at how modules handle import requests. From the module’s perspective of course, this is exporting. The Exporter module provides a generic import subroutine for modules to configure to their own particular tastes. It handles almost all the possible issues that a module needs to consider, and for many modules it 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xTxr6M7h1AqJXV0pm54xPZU2YiM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xTxr6M7h1AqJXV0pm54xPZU2YiM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xTxr6M7h1AqJXV0pm54xPZU2YiM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xTxr6M7h1AqJXV0pm54xPZU2YiM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/hOB6c2lJZEk" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/10/exporting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkENQngzfip7ImA9WxNVGEw.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-6659402535027107125</id><published>2009-10-29T03:04:00.001-07:00</published><updated>2009-10-29T03:04:53.686-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-29T03:04:53.686-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Importing and Exporting" /><title>The ‘import’ Mechanism</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/6659402535027107125/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/10/import-mechanism.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/6659402535027107125?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/6659402535027107125?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/1WM8itMp-ME/import-mechanism.html" title="The ‘import’ Mechanism" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Perl’s mechanism for importing symbols is simple, elegant, and shockingly ad hoc, all at the same time. In a nutshell, we call a subroutine called import in the package that we want to import symbols from. The import stage is a secondary stage beyond actually reading and compiling a module file, so it is not handled by the require directive; instead, it is a separate explicit step:

 require My::
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ufTZ9Nfjutx2ZiTSGfcNbIkudpU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ufTZ9Nfjutx2ZiTSGfcNbIkudpU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ufTZ9Nfjutx2ZiTSGfcNbIkudpU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ufTZ9Nfjutx2ZiTSGfcNbIkudpU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/1WM8itMp-ME" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/10/import-mechanism.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MGQHgzcCp7ImA9WxJSEEs.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-5874543547969422366</id><published>2009-04-29T22:29:00.000-07:00</published><updated>2009-04-29T22:30:21.688-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T22:30:21.688-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Importing and Exporting" /><title>Importing and Exporting</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/5874543547969422366/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/importing-and-exporting.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/5874543547969422366?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/5874543547969422366?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/CHTwRz2lTHA/importing-and-exporting.html" title="Importing and Exporting" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">The term ‘importing’ is used for the process of taking symbols from another package and adding them to our own. From the perspective of the module being imported from, it is ‘exporting’, of course. Either way, the process consists of taking a symbol visible in the namespace of one package and making it visible, without qualification, in another. For example, even if we can see it we would rather 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x6qeDn6BxOgnM8sqrXeKxB8eahE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x6qeDn6BxOgnM8sqrXeKxB8eahE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x6qeDn6BxOgnM8sqrXeKxB8eahE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x6qeDn6BxOgnM8sqrXeKxB8eahE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/CHTwRz2lTHA" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/importing-and-exporting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QGRXszcCp7ImA9WxJSEEs.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-1183156215982575307</id><published>2009-04-29T22:26:00.000-07:00</published><updated>2009-04-29T22:28:44.588-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T22:28:44.588-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Garbage Collection" /><title>Two-Phased Garbage Collection</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/1183156215982575307/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/two-phased-garbage-collection.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/1183156215982575307?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/1183156215982575307?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/Mxo3HctLdkk/two-phased-garbage-collection.html" title="Two-Phased Garbage Collection" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">For most purposes, Perl uses a fast and simple reference-based garbage collection system. For this reason, there's an extra dereference going on at some level, so if you haven't built your Perl executable using your C compiler's -O flag, performance will suffer. If you have built Perl with cc -O, then this probably won't matter.A more serious concern is that unreachable memory with a non-zero 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/klwICXoHlyvnI_jzYrCnYnSM96s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/klwICXoHlyvnI_jzYrCnYnSM96s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/klwICXoHlyvnI_jzYrCnYnSM96s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/klwICXoHlyvnI_jzYrCnYnSM96s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/Mxo3HctLdkk" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/two-phased-garbage-collection.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cMR3w4fyp7ImA9WxJSEEs.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-779560091365756277</id><published>2009-04-29T22:24:00.001-07:00</published><updated>2009-04-29T22:24:46.237-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T22:24:46.237-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Destructors" /><title>Destructors</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/779560091365756277/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/destructors.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/779560091365756277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/779560091365756277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/TgLvG3pri4Y/destructors.html" title="Destructors" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">When the last reference to an object goes away, the object is automatically destroyed. (This may even be after you exit, if you've stored references in global variables.) If you want to capture control just before the object is freed, you may define a DESTROY method in your class. It will automatically be called at the appropriate moment, and you can do any extra cleanup you need to do. Perl 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pS8TeKMududiaNp1Ze8vwclt4Is/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pS8TeKMududiaNp1Ze8vwclt4Is/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pS8TeKMududiaNp1Ze8vwclt4Is/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pS8TeKMududiaNp1Ze8vwclt4Is/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/TgLvG3pri4Y" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/destructors.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cERH86cSp7ImA9WxJSEEs.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-9213947422431654217</id><published>2009-04-29T22:22:00.000-07:00</published><updated>2009-04-29T22:23:25.119-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T22:23:25.119-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Methods" /><title>Method Invocation</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/9213947422431654217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/method-invocation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/9213947422431654217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/9213947422431654217?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/r5VpsMZlNvE/method-invocation.html" title="Method Invocation" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">There are two ways to invoke a method, one of which you're already familiar with, and the other of which will look familiar. Perl 4 already had an ``indirect object'' syntax that you use when you say     print STDERR "help!!!\n";This same syntax can be used to call either class or instance methods. We'll use the two methods defined above, the class method to lookup an object reference and the 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YrazvqNBCplCPMNd5tZ2sVkncR0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YrazvqNBCplCPMNd5tZ2sVkncR0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YrazvqNBCplCPMNd5tZ2sVkncR0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YrazvqNBCplCPMNd5tZ2sVkncR0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/r5VpsMZlNvE" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/method-invocation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4HRXo5eip7ImA9WxJSEEs.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-9213390475182861026</id><published>2009-04-29T22:21:00.000-07:00</published><updated>2009-04-29T22:22:14.422-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T22:22:14.422-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Methods" /><title>A Method is Simply a Subroutine</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/9213390475182861026/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/method-is-simply-subroutine.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/9213390475182861026?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/9213390475182861026?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/TIbgAikhBio/method-is-simply-subroutine.html" title="A Method is Simply a Subroutine" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Unlike say C++, Perl doesn't provide any special syntax for method definition. (It does provide a little syntax for method invocation though. More on that later.) A method expects its first argument to be the object (reference) or package (string) it is being invoked on. There are just two types of methods, which we'll call class and instance. (Sometimes you'll hear these called static and 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-tGZ9KI1OpXz0WkuJA54KQpDgys/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-tGZ9KI1OpXz0WkuJA54KQpDgys/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-tGZ9KI1OpXz0WkuJA54KQpDgys/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-tGZ9KI1OpXz0WkuJA54KQpDgys/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/TIbgAikhBio" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/method-is-simply-subroutine.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8CRH4-eyp7ImA9WxJSEEs.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-2905009091938359770</id><published>2009-04-29T22:19:00.000-07:00</published><updated>2009-04-29T22:21:05.053-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T22:21:05.053-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Classes" /><title>A Class is Simply a Package</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/2905009091938359770/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/class-is-simply-package.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2905009091938359770?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2905009091938359770?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/y0SKxSkAewU/class-is-simply-package.html" title="A Class is Simply a Package" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Unlike say C++, Perl doesn't provide any special syntax for class definitions. You use a package as a class by putting method definitions into the class. There is a special array within each package called @ISA, which says where else to look for a method if you can't find it in the current package. This is how Perl implements inheritance. Each element of the @ISA array is just the name of another
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jKh7wtWcQbCMueLlxeu_1w8xSf0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jKh7wtWcQbCMueLlxeu_1w8xSf0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jKh7wtWcQbCMueLlxeu_1w8xSf0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jKh7wtWcQbCMueLlxeu_1w8xSf0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/y0SKxSkAewU" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/class-is-simply-package.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04ARXs6eip7ImA9WxVaGEg.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-7616148539381880407</id><published>2009-04-15T22:30:00.000-07:00</published><updated>2009-04-15T22:32:24.512-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-15T22:32:24.512-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Objects" /><title>An Object is Simply a Reference</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/7616148539381880407/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/object-is-simply-reference.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/7616148539381880407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/7616148539381880407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/aYHeovRlhOY/object-is-simply-reference.html" title="An Object is Simply a Reference" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Unlike say C++, Perl doesn't provide any special syntax for constructors. A constructor is merely a subroutine that returns a reference to something ``blessed'' into a class, generally the class that the subroutine is defined in. Here is a typical constructor:     package Critter;    sub new { bless {} }That word new isn't special. You could have written a construct this way, too:     package 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FCnddG1pqvB6asD9oQX6ScxZ5eI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FCnddG1pqvB6asD9oQX6ScxZ5eI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FCnddG1pqvB6asD9oQX6ScxZ5eI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FCnddG1pqvB6asD9oQX6ScxZ5eI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/aYHeovRlhOY" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/object-is-simply-reference.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08FQX07fyp7ImA9WxVaGEg.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-8380393469013039244</id><published>2009-04-15T22:29:00.000-07:00</published><updated>2009-04-15T22:30:10.307-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-15T22:30:10.307-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Object Oriented Perl" /><title>Object Oriented Perl</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/8380393469013039244/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/04/object-oriented-perl.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/8380393469013039244?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/8380393469013039244?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/jsQPkASgKYk/object-oriented-perl.html" title="Object Oriented Perl" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">The next series of posts are on Object Oriented Perl!
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Hy-Yh_e8kfdxNRTjSRdU58GotSc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Hy-Yh_e8kfdxNRTjSRdU58GotSc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Hy-Yh_e8kfdxNRTjSRdU58GotSc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Hy-Yh_e8kfdxNRTjSRdU58GotSc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/jsQPkASgKYk" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/04/object-oriented-perl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkACRXc7fip7ImA9WxVWFEk.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-324899720108142626</id><published>2009-02-23T20:04:00.000-08:00</published><updated>2009-02-23T20:12:44.906-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-23T20:12:44.906-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Classes" /><title>Perl Classes</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/324899720108142626/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/02/perl-classes.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/324899720108142626?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/324899720108142626?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/Jv3aBpQai7g/perl-classes.html" title="Perl Classes" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">There is no special class syntax in Perl, but a package may act as a class if it provides subroutines to act as methods. Such a package may also derive some of its methods from another class (package) by listing the other package name(s) in its global @ISA array (which must be a package global, not a lexical).    package Module;  # assumes Module.pm   use strict;   use warnings;   BEGIN {       
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/96yLBAJNa2LfjMR-rH0ckO7k3o0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/96yLBAJNa2LfjMR-rH0ckO7k3o0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/96yLBAJNa2LfjMR-rH0ckO7k3o0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/96yLBAJNa2LfjMR-rH0ckO7k3o0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/Jv3aBpQai7g" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/02/perl-classes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAHQ3g9eSp7ImA9WxVQGEQ.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-2304721514158696610</id><published>2009-02-05T21:04:00.000-08:00</published><updated>2009-02-05T21:05:32.661-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-05T21:05:32.661-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Package Constructors and Destructors" /><title>Package Constructors and Destructors</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/2304721514158696610/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/02/package-constructors-and-destructors.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2304721514158696610?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2304721514158696610?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/Ry19zCMmdb4/package-constructors-and-destructors.html" title="Package Constructors and Destructors" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Four special subroutines act as package constructors and destructors. These are the BEGIN, CHECK, INIT, and DESTROY routines. The sub is optional for these routines.A BEGIN subroutine is executed as soon as possible, that is, the moment it is completely defined, even before the rest of the containing file is parsed. You may have multiple BEGIN blocks within a file--they will execute in order of 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5ogfKIYLR73MSIih0Xm9yFMXMWw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5ogfKIYLR73MSIih0Xm9yFMXMWw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5ogfKIYLR73MSIih0Xm9yFMXMWw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5ogfKIYLR73MSIih0Xm9yFMXMWw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/Ry19zCMmdb4" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/02/package-constructors-and-destructors.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEERnc_fyp7ImA9WxVQGEQ.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-763780984537151715</id><published>2009-02-05T21:01:00.000-08:00</published><updated>2009-02-05T21:03:27.947-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-05T21:03:27.947-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Modules" /><title>Perl modules</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/763780984537151715/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/02/perl-modules.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/763780984537151715?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/763780984537151715?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/HuZrlcw8aRM/perl-modules.html" title="Perl modules" /><author><name>Murugavel Ganesan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Perl provides a mechanism for alternative namespaces to protect packages from stomping on each other's variables. In fact, there's really no such thing as a global variable in Perl. The package statement declares the compilation unit as being in the given namespace.A module is just a set of related function in a library file a Perl package with the same name as the file. It is specifically 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hfpfidTJWKoi2hZiWCuziFznXWg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hfpfidTJWKoi2hZiWCuziFznXWg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hfpfidTJWKoi2hZiWCuziFznXWg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hfpfidTJWKoi2hZiWCuziFznXWg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/HuZrlcw8aRM" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/02/perl-modules.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUEQno6eyp7ImA9WxVSEUg.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-7072151388760373245</id><published>2009-01-05T02:09:00.000-08:00</published><updated>2009-01-05T02:10:03.413-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-05T02:10:03.413-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Undefined Values" /><title>Undefined Values</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/7072151388760373245/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/01/undefined-values.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/7072151388760373245?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/7072151388760373245?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/_iPDlCNyPFE/undefined-values.html" title="Undefined Values" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">The undefined value is a curious entity, being neither a scalar, list, hash, nor any other data type, which is essentially the point. Although it isn’t strictly speaking a datatype, it can be helpful to think of it as a special datatype with only one possible value (NULL). The concept of a ‘value that is not a value’ is common to many languages. In Perl, the undef function returns an undefined 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8rYJxLNXgMzDefIq08XEWnIV_TE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8rYJxLNXgMzDefIq08XEWnIV_TE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8rYJxLNXgMzDefIq08XEWnIV_TE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8rYJxLNXgMzDefIq08XEWnIV_TE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/_iPDlCNyPFE" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/01/undefined-values.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYEQXs4cSp7ImA9WxVSEUg.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-1197875081824947450</id><published>2009-01-05T02:06:00.000-08:00</published><updated>2009-01-05T02:08:20.539-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-05T02:08:20.539-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TypeGlobes" /><title>TypeGlobes</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/1197875081824947450/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/01/typeglobes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/1197875081824947450?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/1197875081824947450?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/OuBjaMYsFVs/typeglobes.html" title="TypeGlobes" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">The typeglob is a composite data type that contains one instance of each other data types. It is an amalgam of all Perl’s data types, from which it gets its name. It is a sort of ‘super reference’ whose value is not a single reference to something but six slots that can contain six different references, all at once: a.scalar – A reference to scalarb.array – A reference to arrayc.hash – A 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bPzIAJcHcM37FAoKVW3ckNKC3qQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bPzIAJcHcM37FAoKVW3ckNKC3qQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bPzIAJcHcM37FAoKVW3ckNKC3qQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bPzIAJcHcM37FAoKVW3ckNKC3qQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/OuBjaMYsFVs" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/01/typeglobes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04GRX07eyp7ImA9WxVSEUk.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-5643245739046096988</id><published>2009-01-05T02:01:00.000-08:00</published><updated>2009-01-05T02:05:24.303-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-05T02:05:24.303-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Data Structures" /><title>Complex Data Structures</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/5643245739046096988/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2009/01/complex-data-structures.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/5643245739046096988?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/5643245739046096988?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/tta0VLRmbWQ/complex-data-structures.html" title="Complex Data Structures" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Combining lists and hashes with references allows us to create arbitrarily complex data structures such as list of lists, hashes of hashes, and lists of hashes of lists of lists and so on. However, Perl lacks the ability to explicitly declare things like multidimensional arrays, because lists and hashes can only contain scalar values. Example 1:# List of list references@arr = ( [1,2], [3,4,5], [
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ea0xeHcUsoZpcP17vjzW8VtxzRc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ea0xeHcUsoZpcP17vjzW8VtxzRc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ea0xeHcUsoZpcP17vjzW8VtxzRc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ea0xeHcUsoZpcP17vjzW8VtxzRc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/tta0VLRmbWQ" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2009/01/complex-data-structures.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMARX84eyp7ImA9WxVSEUk.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-4077694470908302953</id><published>2008-12-09T05:27:00.001-08:00</published><updated>2009-01-05T00:17:24.133-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-05T00:17:24.133-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="references" /><title>Symbolic references</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/4077694470908302953/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/12/symbolic-references.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/4077694470908302953?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/4077694470908302953?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/lJSIMHKMyls/symbolic-references.html" title="Symbolic references" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">The value of the scalar is taken to be the name of a variable, rather than a direct link to a (possibly) anonymous value.   $name = "foo";  $$name = 1;                 # Sets $foo  ${$name} = 2;               # Sets $foo  ${$name x 2} = 3;           # Sets $foofoo  $name-&amp;gt;[0] = 4;             # Sets $foo[0]  @$name = ();                # Clears @foo  &amp;amp;$name();               # Calls &amp;amp;foo() (as in 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/m1deTGZZpc21RhMgp75DIhihbvQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/m1deTGZZpc21RhMgp75DIhihbvQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/m1deTGZZpc21RhMgp75DIhihbvQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/m1deTGZZpc21RhMgp75DIhihbvQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/lJSIMHKMyls" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/12/symbolic-references.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUICRHsyfip7ImA9WxVSEUk.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-515239008044855085</id><published>2008-12-09T05:26:00.001-08:00</published><updated>2009-01-05T00:19:25.596-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-05T00:19:25.596-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="references" /><title>Using References</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/515239008044855085/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/12/using-references.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/515239008044855085?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/515239008044855085?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/ZniDueS6ejA/using-references.html" title="Using References" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">That's it for creating references. By now you're probably dying to know how to use references to get back to your long-lost data. There are several basic methods. 1. Anywhere you'd put an identifier (or chain of identifiers) as part of a variable or subroutine name, you can replace the identifier with a simple scalar variable containing a reference of the correct type:    $bar = $$scalarref;    
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/swC6j8gntTzBd-wg0rqdZAdTvAw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/swC6j8gntTzBd-wg0rqdZAdTvAw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/swC6j8gntTzBd-wg0rqdZAdTvAw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/swC6j8gntTzBd-wg0rqdZAdTvAw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/ZniDueS6ejA" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/12/using-references.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08MQngzfCp7ImA9WxJTGUQ.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-6255429927620492001</id><published>2008-12-09T05:25:00.001-08:00</published><updated>2009-04-29T03:11:23.684-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T03:11:23.684-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="references" /><title>Making references</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/6255429927620492001/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/12/making-references.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/6255429927620492001?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/6255429927620492001?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/q68JdXOYUHc/making-references.html" title="Making references" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">References can be created in several ways. Three of them are as follows. By using the backslash operator on a variable, subroutine, or value. (This works much like the &amp;amp; (address-of) operator in C.) This typically creates another reference to a variable, because there's already a reference to the variable in the symbol table. But the symbol table reference might go away, and you'll still have the
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/V5CP-YmDTbuCGxnXwWeJm4nh01s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V5CP-YmDTbuCGxnXwWeJm4nh01s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/V5CP-YmDTbuCGxnXwWeJm4nh01s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/V5CP-YmDTbuCGxnXwWeJm4nh01s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/q68JdXOYUHc" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/12/making-references.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04HR349eSp7ImA9WxJTGUQ.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-2055744206448092054</id><published>2008-12-09T05:19:00.000-08:00</published><updated>2009-04-29T03:12:16.061-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T03:12:16.061-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="references" /><title>Perl references</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/2055744206448092054/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/12/perl-references.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2055744206448092054?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/2055744206448092054?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/vzCqf465z7E/perl-references.html" title="Perl references" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Before release 5 of Perl it was difficult to represent complex data structures, because all references had to be symbolic--and even then it was difficult to refer to a variable instead of a symbol table entry. Perl now not only makes it easier to use symbolic references to variables, but also lets you have ``hard'' references to any piece of data or code. Any scalar may hold a hard reference. 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2SIVv7EK-j-f4g9jCL09V9nGpDs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2SIVv7EK-j-f4g9jCL09V9nGpDs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2SIVv7EK-j-f4g9jCL09V9nGpDs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2SIVv7EK-j-f4g9jCL09V9nGpDs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/vzCqf465z7E" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/12/perl-references.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYCQHY_eyp7ImA9WxJSEE0.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-5365909698006818817</id><published>2008-01-26T06:16:00.000-08:00</published><updated>2009-04-29T03:16:01.843-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-29T03:16:01.843-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Usage" /><title>Perl to write what??</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/5365909698006818817/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/01/perl-to-write-what.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/5365909698006818817?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/5365909698006818817?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/79cyYtPbdis/perl-to-write-what.html" title="Perl to write what??" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">We all know that when faced with a job to do, we usually tend to reach for the most familiar tool in our belt. And while perl is certainly a versatile tool, it isn't the right tool for every job.Perl is the granddaddy of the open-source scripting languages, with the 1.0 release seeing the light of day way back in 1987. By comparison, PHP wasn't released until 1994, and Python didn't have its 0.9 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a9K8HSCO3gMp5JsPZ6GAPVLl9sY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a9K8HSCO3gMp5JsPZ6GAPVLl9sY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a9K8HSCO3gMp5JsPZ6GAPVLl9sY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a9K8HSCO3gMp5JsPZ6GAPVLl9sY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/79cyYtPbdis" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/01/perl-to-write-what.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEADSH05fip7ImA9WxZTFEo.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-3651895878067958871</id><published>2008-01-16T01:45:00.000-08:00</published><updated>2008-01-16T01:46:19.326-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-16T01:46:19.326-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Special Variables" /><title>Special Variables</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/3651895878067958871/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/01/special-variables.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/3651895878067958871?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/3651895878067958871?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/DZIsYCETrKU/special-variables.html" title="Special Variables" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">@ARGV  Short Name:          @ARGVScope:               always global  This variable is an array of the arguments passed to the script. Unlike the situation in the C language, the first element of this array is the first argument (not the program name). As the arguments are processed, the value of this variable can alter.   Example:   $Example46String = "There were $#ARGV arguments, first argument 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/b1c8kJ471qIMdv7A2ncUWaBeqdU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b1c8kJ471qIMdv7A2ncUWaBeqdU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/b1c8kJ471qIMdv7A2ncUWaBeqdU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/b1c8kJ471qIMdv7A2ncUWaBeqdU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/DZIsYCETrKU" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/01/special-variables.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAGRHk-cSp7ImA9WxZTFEo.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-557902241305949264</id><published>2008-01-16T01:43:00.002-08:00</published><updated>2008-01-16T01:45:25.759-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-16T01:45:25.759-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Regular Expressions" /><category scheme="http://www.blogger.com/atom/ns#" term="Meta-Sequences" /><category scheme="http://www.blogger.com/atom/ns#" term="Meta-Characters" /><category scheme="http://www.blogger.com/atom/ns#" term="Meta-Brackets" /><title>Regular Expression Meta-Characters, Meta-Brackets,and Meta-Sequences</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/557902241305949264/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/01/regular-expression-meta-characters-meta.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/557902241305949264?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/557902241305949264?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/BDdlkgIzIUg/regular-expression-meta-characters-meta.html" title="Regular Expression Meta-Characters, Meta-Brackets,and Meta-Sequences" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">             Meta-Character         Description             ^         This   meta-character, the caret, matches the beginning of a string or, if the /m   option isused, match the beginning of a line. It is one oftwo pattern   anchors, the other anchor is the $.              .         This   meta-character will match any single character except for the newline   character unless the /s option is 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TdxCAqaC2t8RYgDQiv5BzMESHP8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TdxCAqaC2t8RYgDQiv5BzMESHP8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TdxCAqaC2t8RYgDQiv5BzMESHP8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TdxCAqaC2t8RYgDQiv5BzMESHP8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/BDdlkgIzIUg" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/01/regular-expression-meta-characters-meta.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEGRXk8fSp7ImA9WxZTFEo.&quot;"><id>tag:blogger.com,1999:blog-289960167442567338.post-3111043404965762807</id><published>2008-01-16T01:43:00.001-08:00</published><updated>2008-01-16T01:43:44.775-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-16T01:43:44.775-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Substitution" /><title>Substitution</title><link rel="replies" type="application/atom+xml" href="http://amazing-perl.blogspot.com/feeds/3111043404965762807/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://amazing-perl.blogspot.com/2008/01/substitution.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/3111043404965762807?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/289960167442567338/posts/default/3111043404965762807?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AmazingPerl/~3/FZqW-oqMwvc/substitution.html" title="Substitution" /><author><name>Guest Blogger</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">When you get the hang of pattern matching, you'll find that substitutions are quite straightforward and very powerful. The substitution operator is s///, which resembles the match operator but has three rather than two slashes. Just as you can do with the match operator, you can substitute any other character for the forward slashes, and you can use the optional i, g, and o switches.   The 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UlvJdDM1b2D-Y8X5Mz6nNO82CWo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UlvJdDM1b2D-Y8X5Mz6nNO82CWo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UlvJdDM1b2D-Y8X5Mz6nNO82CWo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UlvJdDM1b2D-Y8X5Mz6nNO82CWo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AmazingPerl/~4/FZqW-oqMwvc" height="1" width="1"/&gt;</content><feedburner:origLink>http://amazing-perl.blogspot.com/2008/01/substitution.html</feedburner:origLink></entry></feed>

