in reply to Re: Re: Should I learn Perl?
in thread Should I learn Perl?

Here is my take on the languagues:

Perl - Basic on steriods, instant gratification and debugging
     - Got a bad wrap in CGI circles because it was so easy to
     - do CGI stuff that lots of people did - BADLY
C    - THE language that made programming what it is today
     - All the power of assembler in a (slightly) more user friendly package
ASM  - Everything ends up here. To code C you need to have
     - a handle on the guts of the system anyway
C++  - C extended to do OO better. Unnecessary for single programmer
     - as you can do it in C in half the code (procedural)
     - Forces you to be OO which is not needed for short stuff
     - It is way easier to do multi-programmer stuff OO with solid APIs
     - Yeah, yeah what starts little often suffers featuritis 
Java - C++ with all the power toys taken away. Comiles to bytecode not ASM
     - Supposed to be portable but MS got involved ;-)
     - speed not that great due to partial compilation
     - TRENDY in management circles.

Here is a nice one liner for you:

perl -pi.bak -e 's/something/otherthing/g' <FILE LIST>

That particular snippet does a search and replace on a list of files writing a backup to filename.bak in the process. Handy and 100s of times faster than doing the same in a Windows based editor.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: Re: Should I learn Perl?
by Anonymous Monk on Mar 10, 2003 at 22:09 UTC

    Corrections about Java:

    Comiles to bytecode not ASM

    FUD. There are native compilers. Java is widespread and has tonnes of compilers, including many native ones. You can compile it to (almost) anything you want.

    Supposed to be portable but MS got involved

    FUD. Microsoft's more involved in Perl.

    speed not that great due to partial compilation

    Big can of worms here, so I'll be vague. It's not as fast as well-written c or even c++ but it is slightly faster than Perl. Most people will agree with that definition but how much faster depends on what your doing and how you're doing it.

    TRENDY in management circles.

    Once again, FUD. This is implying that it doesn't stand on it's own technically. The poster wanted a technical review, this is a cheap shot.

    For the record, THIS IS A lc(PERL) SITE! Do not ask for comparisons here, they'll be biased as hell. Would you go to a christian website and ask what the best religion is? Same deal, only it's worse with programming languages. Forget everything you've heard here. Study them all, learn on your own.

      The trendy in management circles was not intended as a cheap shot. Simply an observation, and an accurate one at that. If you wanted to learn a languague then there are likely to be more Java Jobs than Perl Jobs in the forseeable future. Sad IMHO but true.

      As you correctly note speed wise Java sits C C++ Java Procedural Perl OO Perl. But as always it is application dependent and speed is always better if the algotithms are better in any lang. For example at Re: Performance Question I showed one monk how a small change in approach could speed processing time for a large file from 166 hours (1 week) to < 6 hours. In this case the bottleneck was disk IO so it would not really matter what language you used.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print