Kaishaku in Orlando is doing 33 things including…

Learn Perl


 

Kaishaku has written 6 entries about this goal

Here's a cool one a friend challanged me to write 10 months ago

It calculates a Morris sequence of numbers. This is also called the “look and say” sequence. For example, if the first number is 1, then the second number is 11, because there is one one in the previous element. Then the next number in the sequence would be 21, because there are two ones. Etc.

(Sorry, deleted the code because it was getting all messed up, even wrapped in pre tags. It’s… here http://kaishaku.diaryland.com/090129_39.html )



Perl is pretty much the awesome. 10 months ago

Example:

sub sum_of_list
{
my $total;
foreach(@_)
{
$total += $_;
}
$total;
}

And that will return the sum of a list of numbers. What’s friggin’ awesome about it? It works with any number of parameters. Perl’s handling of lists is awesome in this respect. You can do:
sum_of_list(1, 3, 5, 7, 9); or
sum_of_list(qw/1 3 5 7 9/); or even
sum_of_list(1..100);

So, pretty much loving it so far.



Untitled 11 months ago

I received my copy of Learning Perl a couple days ago. Yesterday I was cleaning out the bookshelf to make room for the lady friend’s stuff, and I find … Learning Perl. I knew I had read it before but I thought it was a library copy. At least the new one is the 3rd edition and the old one is 1st. I’m keeping them both to remind myself of my stupidity.



Wrote a perl script today 11 months ago

Using regex! It worked and was possibly even partially non-retarded.



Untitled 11 months ago

Learning Perl by Schwartz & Phoenix was available on half.com for 75 cents plus shipping. I snatched it up.



Untitled 13 months ago

I read the Larry Wall book about 12 or 15 years ago, but it didn’t sink in permanently because I never did much scripting. Nowadays I sometimes find myself doing something where a perl script would have suited excellently, but my inexperience in perl causes me to usually write it in C or Java (as overkill as that may be).

I considered other scripting possibilities:
  • JavaScript? I dig the first-class functions but it’s too web-oriented
  • PHP? Suffers the same negatives
  • Lisp or Scheme? Probably too theoretical for me.

So, I think I’ll have to hit the library again for that perl book.



 

I want to:
43 Things Login