This blog no longer exists.
You will be redirected to something cool.
Showing posts with label context. Show all posts
Showing posts with label context. Show all posts

Monday, September 19, 2011

I Think I Got It (Context)

Well, I hit the books, so to speak, and completed that scary homework assignment on context in Perl. At first I made a bit of a mistake, but I mucked through it and I think I've got it. My program works according to what the assignment wanted, hopefully I wrote it in a way that works in the way the assignment intended.

I have a few short essays in the chapter to complete, but then I get to move on to creating my first subroutines in Perl. Finally!

Things will be winding down with Perl after the next few chapters and then the course with be over. I'll (probably) have the Python course next. I'll take that road when I get to it (or however that idiom goes.)

Saturday, September 17, 2011

Wrapping My Head Around Scalar & List Context

I've been working on learning the various nuances of scalar and list context in Perl. It seems straightforward, but I am worried I'm not getting things 100%. There is a lot of scary talk basically saying if I don't learn it, bad things will happen. This sort of leads me to believe that this might either be difficult stuff or easy to overlook.

In fact, one example which was an array in scalar context output something I didn't expect. I expected the script to spit out the array in a string, but rather it gave me 6, which is the number of elements in the array. I'm pretty sure I know why, but I'll just have to do the homework to see if I'm really grasping this concept.