I used Perl occasionally starting in 1998 for various database scripts that I inherited at a client site. Since I was working on a Pro*C project at the time, I was not able to get into it too much. Finally, about two years ago, I needed to dig through data in an 700+Mb report, and compare the data with entries on Oracle. This was when it all started. I still do a lot of database scripting with Oracle, and have automated much of my support work to the point that what took hours, I now have a report ready for my in my mailbox when I come to work in the morning.
Regarding the bigger question, I have three big reasons why I learn a language.
- I like getting paid. Being a consultant, there are several languages I prefer to work with, but I prefer to eat, keep a roof over my head, etc. over sticking to one language. I know there are people making (good) money working with only one language, but I'd rather not take that risk.
- I always learn something new when working with a language that I can transfer back to the other languages I use. I have begun to agree with the fact that it takes at least ten years to really learn a skill. This past summer, I was learning Scheme, when the light turned on regarding something I was working on in Java that allowed me to simplify a design significantly and improve performance in the end. Now, working with C# has given me examples of where it is good to use function references in Perl and Python.
- I always find the limitations of a language while learning other ones. My recent work in C# has shown me several of the deficiencies in Java. My reference above to function references above was on limitation I found. But, C# is missing anonymous subclasses. Neither C# or Java have anonymous functions, but I can work with anonymous functions in Perl, Python, Scheme, etc. But overall, they all have their beautiful features and warts. After working with several languages, I can do a much better job now with suggesting the correct language for a job than I could five years ago.