Ruby shares many of its eclecticism's with Perl - lots of ways of doing the same thing, though it doesn't go quite so far (some would say so far beyond the reasonable) as Perl does. So when you come to create or manipulate an array (really an ordered list) there's a big choice.
indian = ....
In many languages, you're required to put brackets around the boolean condition in your if and while statements, and around parameters you're passing to functions. And it becomes the natural way of coding for programmers in languages like Java, C and C++. But when you think about it, those brackets ....
Almost every program I've ever written (and almost every program you'll ever write) is required to output a mixture of constant character strings and results - formatting the output into a human readable form, or adding in separators between values in data files which the next program in a chain wil ....
We teach many delegates how to program in "xxxx", where xxxx is a language such as Perl, PHP, Python, Lua, Ruby, etc. Some of those delegates arrive with us with prior programming experience, and require what is in essence a conversion course - the base concepts from Pascal will set them in good st ....
I ran an extra Perl for larger projects course, single company, at the tail end of last week and into the weekend (the only gap in my diary for a few weeks!) and - as is often the case on single-company courses - I wrote some new illustrative code to show specific subjects that came up in a differen ....
If you find yourself thinking about something you saw six months ago, then it must have had an effect on you. And it's more than six months since I saw a sign in Cambridge advertising "free computer lessons".
Why does it keep coming back to me - this yellow sign, tied to some railing to promote s ....
What if you want a Perl process to go off in two different directions at the same time - perhaps a server that's going to handle several connections at the same time, or an application that's going to be doing heavy processing, but at the same time has to respond to inputs from elsewhere, such as th ....
When you "bless" a variable in Perl, what are you doing?
You are taking the address of the variable, and returning a "reference to an object" - that's a result which contains three pieces of information:
1. The address in memory at which the object is held
2. The type of Perl structure that's held ....
"Do you do a course on Perl?"
I suppose the question was a natural one, asked of me way back in 1996. After all, I was a trainer teaching subjects such as C Programming, Introduction to Solaris, and Silicon Graphics courses such as Irix for Users and GL programming. And I was using Perl to provi ....
If you want to perform a multiple alternative branch in Perl, the traditional way has been to use if, a series of elsif (note the spelling!) checks, and a final else if you want to add a default or otherwise condition [example]. Until recent versions, there was no switch statement or equivalent. ....