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

<channel>
	<title>Dan Appleyard &#187; Perl</title>
	<atom:link href="http://www.danappleyard.com/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danappleyard.com</link>
	<description>Developer&#039;s Thoughts on Tech, Life, &#38; Stuff</description>
	<lastBuildDate>Thu, 21 Jul 2011 21:43:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A look at Perl</title>
		<link>http://www.danappleyard.com/2010/05/17/a-look-at-perl/</link>
		<comments>http://www.danappleyard.com/2010/05/17/a-look-at-perl/#comments</comments>
		<pubDate>Tue, 18 May 2010 03:42:51 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=21</guid>
		<description><![CDATA[Okay,yesterday I went over a list of possible programming languages to learn.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided [...]]]></description>
			<content:encoded><![CDATA[<p>Okay,<a href="http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/">yesterday I went over a list of possible programming languages to learn</a>.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided to do is see how complex it is to do the same thing in each language.  What better to test out a language than to create a class?</p>
<h2>My Control Class</h2>
<p>I started out creating a basic VB.NET class &#8211; a Person class that simply introduces itself:</p>
<pre class="brush: vb">Public Class Person
   Private FirstName As String
   Private LastName As String
   Private Age As Integer
   Public Sub New(ByVal firstName As String, ByVal lastName As String, ByVal age As Integer)
      Me.FirstName = firstName
      Me.LastName = lastName
      Me.Age = age
   End Sub
   Public Function IntroduceYourself() as String
      Return "Hello, my name is " &amp; FirstName &amp; " " &amp; LastName &amp; ", and I am " &amp; Age &amp; " year(s) old."
   End Function
End Class</pre>
<h2>My Control Implementation</h2>
<pre class="brush: vb">Dim dan As New Person("Dan", "Appleyard", 27)
Console.WriteLine(dan.IntroduceYourself())</pre>
<p>I will compare this to each of the languages I will investigate.  Now the Perl code!</p>
<h2>Perl Class</h2>
<pre class="brush:perl">package Person;

sub new
{
    my $class = shift;
    my $self = {
        _firstName =&gt; shift,
        _lastName  =&gt; shift,
        _age       =&gt; shift,
    };

    bless $self, $class;
    return $self;
}

sub IntroduceYourself {
	my( $self ) = @_;
	return "Hello, my name is $self-&gt;{_firstName} $self-&gt;{_lastName}, and I am $self-&gt;{_age} year(s) old."
}
1;</pre>
<p>Now I am not going to explain every line in this code, just know that with my limited knowledge of Perl (as of now), this is how you make a class in Perl.</p>
<h2>Perl Implementation</h2>
<pre class="brush:perl">use Person;

$dan = new Person ("Dan", "Appleyard", 27);

print $dan-&gt;IntroduceYourself();</pre>
<h2>My Thoughts</h2>
<p>Defining a class in Perl is quite different than VB.NET, wouldn&#8217;t you agree? What is with this $shift?  What is the heck is this bless?  If I decided to do Perl first, these are things I am going to have to pick up.  Tomorrow, I am going to go over the same class implementation in Python.  Until tomorrow then!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/17/a-look-at-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn a new programming language</title>
		<link>http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/</link>
		<comments>http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/#comments</comments>
		<pubDate>Sun, 16 May 2010 21:18:23 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=10</guid>
		<description><![CDATA[I want to broaden my development skills.  I am too focused on .Net technologies.  There are so many other options out there &#8211; Ruby, PHP, Java, Perl, Python, etc.  That being said, I have recently decided to learning a new programming language.  Currently, I know VB.NET, C#, and JavaScript &#8211; pathetic I know.  Of those options [...]]]></description>
			<content:encoded><![CDATA[<p>I want to broaden my development skills.  I am too focused on .Net technologies.  There are so many other options out there &#8211; Ruby, PHP, Java, Perl, Python, etc.  That being said, I have recently decided to learning a new programming language.  Currently, I know VB.NET, C#, and JavaScript &#8211; pathetic I know.  Of those options out there, which one should I learn?  According to <a title="10 programming languages you should learn right now" href="http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/" target="_blank">eWeek.com</a>, I should learn them all.  The funny thing is, I wrote that orginal list of languages before I even found this article.   While the article has been around coming on four years now, I think it is still a valid list (even though I personally disagree the distinction between AJAX and JavaScript as two separate languages). </p>
<p>Now the original question has changed from &#8220;what language should I learn&#8221; to &#8220;what language should I learn first&#8221;.  Some would say that since I know C# Java would have the easiest learning curve.  I don&#8217;t know quite yet.  What are the pros and cons of each language?  Each day this week I will talk about one language and go over the pros and cons of learning it.  These will be MY pros and cons &#8211; not the standard pros and cons of each language. </p>
<p>Tomorrow &#8211; Perl!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

