Friday, June 6, 2008

Wake up Perl Experts !!

I (dilbert) am not a Perl expert, I use the language once in a while. One fine day I decided to brush up my Perl skill and started reading Perl Black Book

After I breezed throught some easy chapters, I hit an important milestone, the usage of my, local scope. This was something I had forgotten.. so I read it with great interest. I read the examples and the concepts become clear to me.

Asok (perl expert) was working at Wally's desk. I pinged him and just to trouble him I asked him to explain the difference between my and local, and he did it perfectly. Then Asok and me decided to check if boss knew these concepts (since the boss claims himself to be a technical expert).

I called up boss and we had this conversation

Dilbert: Hello
Boss: हल्लू
Dilbert: Tell me one thing, what's the difference between my and local ?
Boss: (A pause of 2 secs) See my is actually used for local variables. And local is different.
Dilbert: (Controlling his laughter) what does that mean ?
Boss: See local is mostly used to getting system/environment variables.
Dilbert:(Had enough of this nonsense) Ok. It would be good if you can give me some code samples.
Boss: Ok


Dilbert and Asok both have a good laugh about this. Within minutes the boss comes to Dilbert's desk (to give some "garbage" suggestions)

Boss: See my and local are there, but now Perl has come up with a new concept called our ! हाँ !

Dilber,Asok: (Putting up a straight face and controlling the laughter) Hmm.. ok

After the boss had left the scene, Asok and Dilbert broke into laughter :D:D:D



Larry Wall needs to be updated that our a recently added keyword!

No comments: