For example... say I want to have a dynamically sized array of stuff, in Perl thats what an @array is. In C++, or Java for that matter, I would spend a day just coding the array structure that I want, and then I still would only be able to put one type of thing in it, so I would have to define an object that could contain whatever types of data I wanted to put in the array in the first place, which just gets ugly... fast.
Perl, on the other hand, has its focus on text. We have regular expressions (RegExes) and split and the concept of a $scalar instead of an array of chars [ ]. Thats what most of us work with. We want to write tools that interact with databases and web servers, scripts for system administration and automation, programs to handle e-mail and play games. Most* of that is text oriented.
Yeah, you can do math in Perl (and there are plenty of modules at CPAN to help you with the complex stuff), but when was the last time your project was to dynamically calculate the trajectory of a rocket accounting for changes in mass and size over time**? I mean really? (And if your project did involve something that complicated - Please tell me you didn't use Perl! That is definately a C or C++ problem!)
So my answer is that we like Perl because we can get things done quickly in Perl. We don't need to do any real set-up, because that's been done for us. And that Is A Good ThingTM. You see?***
Footnotes:
* I say "most" because we also have common questions like, "How do I generate a random unique number" and "How do I generate a random fully solveable maze?" which are not so much text as they are numerical and logical. But my point stands.
** Loss of mass resulting from use of fuel, and change of size in the form of metal expansion at high temprature. These are real issues involved in rocket trajectories.
*** Actually, there are plenty of other reasons, but that is the one at the top of my top 5 list: Flexability, Ease of learning, Ease of extension, Portability, Community Support.
In reply to RE: Late night revelation of PERL
by Adam
in thread Late night revelation of PERL
by Macphisto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |