06-14-2011
23,310,
4,623
Join Date: Aug 2005
Last Activity: 7 July 2020, 11:47 AM EDT
Location: Saskatchewan
Posts: 23,310
Thanks Given: 1,331
Thanked 4,623 Times in 4,217 Posts
There's a whole lot more to a language than 'faster' or 'slower'. How well it works for you depends quite a bit on what you do with it. There'd be tasks that'd be slow in Perl and fast in Java and vice versa; and more importantly, there'd also be things which are very simple in Perl and very difficult in Java and vice versa; that's the main reason people use any programming language -- convenience.
Perl is a versatile language that started as a string-processing language, but is extensible with modules that make it useful for just about anything; people have written games, data miners, and more in it. It's also relatively easy to get these modules, as it comes with CPAN, a program which can download and install Perl modules from a central repository for you. It supports object-oriented programming and complex data structures, albeit in an unconventional way. But string processing remains its greatest strength.
So if you have to load a thousand records from a database, do some complicated data processing on it and put them somewhere else, Perl would be a good language for that. Being built for it, it might even beat Java's speed. If you want to write a graphic editing program, Java might be better suited to that; Perl may be capable of it using modules, but its CPU and memory use wouldn't be the most efficient.
Last edited by Corona688; 06-14-2011 at 04:38 PM..