wood burning stoves*
The moose likes Meaningless Drivel and the fly likes Who love Perl here? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Who love Perl here?" Watch "Who love Perl here?" New topic
Author

Who love Perl here?

Fei Ng
Ranch Hand

Joined: Aug 26, 2000
Posts: 1242
Who love Perl here?
i am ok with it but hate the syntax. Just my opinion.
I know people love it.
Ronnie Johnson
Ranch Hand

Joined: Jul 28, 2001
Posts: 106
Best language ever.
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

Hi FEI, i have coded a little bit with Perl and know its very powerful for text-processing. For its hard to remember syntaxes as u identified, i dont like it....

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!


Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Fei Ng
Ranch Hand

Joined: Aug 26, 2000
Posts: 1242
I agree..... powerful language!! Great for text processing!
Syntax hell! Going to have to use for the next two month!!
Congrats me pls! hehehehee
I like the langauge but do not like to read it.
There will be at least 5mb of Perl code for me to read.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

It has been said that perl is a 'write-only' language, because no one can read it.

It's also been said that one can write poetry with perl.

Fei Ng
Ranch Hand

Joined: Aug 26, 2000
Posts: 1242
i wonder how many perl books i need..
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Whoa people, perl is NOT unreadable unless it is written that way. As java programmers we might not realize that the property of being unobfuscatable is not common in programming languages. Well written perl is beatiful, concise, fast, and deadly powerful. People who actually do a lot of perl programming comment more than Java programmers. Perl does, however, allow a dedicated person to write the most mind twisting puzzles. It has soooo many backdoors and nooks and crannies. I think it's safe to say that perl takes a long time to master, but for nearly all purposes you don't need to be a master. Normal code in perl is quite effective.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
How many books you need depends on what you need to know. All I've read is the camel book (Programming Perl), but all the Oreilly perl books (Perl Cookbook, Mastering Regular Expressions with Perl, and Data Structures and Algorithms in Perl are the other main ones I think) look like good books.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
It's also been said that one can write poetry with perl.

You can write poetry in Perl, and many people have done so.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
FEI - I like it, but do not love it.
Good luck on the project.
Regards, Guy
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Perl rocks! Very powerful in many ways. I programmed in Perl before Java and really appreciated the way it made things that were difficult in some languages (like hardcore text processing) very simple. Some of the first Java routines I wrote were trying to duplicate Perl functions. If you spend any decent amount of time programming in it I am sure you will come to appreciate it.
As far as books go, Learning Perl has to be one of the best language intro books ever written, I've been waiting for somebody to reproduce the usefulness of the Perl Cookbook in Java, and Mastering Regular Expressions is the definitive text on the subject and should be read by anybody who works with regexes, regardless of language.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Let's not forget that the new version of Java (1.4) has powerful text provessing features just like Perl!


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Originally posted by Thomas Paul:
Let's not forget that the new version of Java (1.4) has powerful text provessing features just like Perl!

I know regexes are on the way, but it will take a long time for Java to catch up with a language who specializes in this (text processing). I've been waiting for Java to include regexes as part of the API for a couple years now, can't imagine what took them so long. Even JavaScript has had regexes for awhile now.
While I'm extolling the virtues of Perl, I should also mention that I much prefer the way Perl handles I/O compared to most languages, particularly Java. I'm not saying Java doesn't have powerful I/O, it's just a bit less of a song and dance to do routine file operations and piping in Perl.
[This message has been edited by Jason Menard (edited December 10, 2001).]
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Originally posted by Thomas Paul:
Let's not forget that the new version of Java (1.4) has powerful text provessing features just like Perl!

Yes it has regex support, but hell no it isn't 'just like Perl.' Perl regex support is one of the most incredible, useful, and unique features of all the languages I've come across. Perl is built from the start with text processing in mind, so Java really can't even begin to compare.
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
People who like perl often describe it as the Duct Tape of the internet. It may well perform that function, but if you were contracting an engineer for a product, would you be impressed if he/she told you that the main construction tool was duct tape.
Perl is often cited as a good tool for "quick and dirty" jobs. In my experience in the end these jobs are never quick but always dirty. An illustration of the unsuitability of Perl for software engineering is that there is an instruction you can use at the start of a Perl file called
use strict;
This is to tell the compiler that all variables must be declared before being used. This may seem a virtue that such a command exists, but the fact that this off by default indicates that the standard mode for perl is
use slack;
How many millions of programmer hours have been wasted whilst programmers hunt for a phantom variable assignment that went away due to a misspelling.
Marcus
------------------

http://www.jchq.net Mock Exams, FAQ,
Tutorial, Links, Book reviews
Java 2 Exam Prep, 2nd Edition by Bill Brogden and Marcus Green
=================================================
JCHQ, Almost as good as JavaRanch
=================================================


SCWCD: Online Course, 50,000+ words and 200+ questions
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
I agree that in most cases Perl would not be the choice for a large project. That being said, I think of Perl more as a utility language. Often it is used for the kind of things that shell scripts would be written for. As has already been mentioned, it excels in text processing so it has many uses in that arena. But again, for small utility type programs, particularly those that interact heavily with the OS, it's hard to go wrong with Perl.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Fact: this message board is written in perl
Fact: http://slashdot.org/ is written in perl
Fact: Perl is a very effective language for projects big and small, however it can be programmed poorly just like any language.
Marcus, I have made many 'quick and dirty' jobs quite quickly and not so dirty. Someone who actually uses the language regularly (i.e. not me) would make them lightning fast and cleanly. I remember seeing a post on the Amazon.com review of Data Structures and Algorithms in Perl that said the book was good, but data structures in perl are so simple and effective that a book isn't necessary for the topic.
You have to hunt for errors in any language. If you write poor code in java, you can expect that you'll have trouble debugging it. If you're wasting hours debugging simple mispellings, then you are probably not suited for perl programming.
[This message has been edited by David Garland (edited December 11, 2001).]
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
Fact: The discussion system I run is written in perl
Fact: I (and I can surmise Paul W) could find nothing better at the time.
Fact: Perl has been around much longer than Java
Fact: People use the tools they have when they have them.
Opinion: Perl makes it easier to write buggy code, in a similar way that C makes it easy to write buggy code.
Factoid: Most of the slash like new products use PHP not perl (see PHPNuke, PostNuke, etc etc). PHP at least udnerstands HTML from the ground up. But it still stinks (not even a use strict equivalent). You want your visitors to see out of memory errors when they visit your site, checkout a PHP solution near you now.
Opinion: The meaning of a Perl variable depends on context, I prefer the meaning of a variable to be the same whatever the context.
Langauge wars... I love em

MG

Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
The Perl Cookbook is a most excellent source if you really do want to write undreadable insecure web apps .
Marcus
------------------

http://www.jchq.net Mock Exams, FAQ,
Tutorial, Links, Book reviews
Java 2 Exam Prep, 2nd Edition by Bill Brogden and Marcus Green
=================================================
JCHQ, Almost as good as JavaRanch
=================================================
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
It sounds to me like you have no use for any language that isn't strictly controlled, high-level, object-oriented, or otherwise more modern. It sounds like the only complaint you can come up with is that by default you are allowed to use variables you haven't declared (the memory argument holds no weight next to the bulkier and slower options that every is writing 'good' code in these days). If you have a problem with that, 'use strict'. I could complain that java sucks because the multi-threading system only allows and asynchronous method to have the name 'run()', but I'm not going to because I feel I am able to write effective and well-designed code without feeling the ill-effects of this flaw. You can write bad and good code in any language. The argument that perl is more inviting to non-object-oriented masterpieces is a valid point, but an unproductive one and certainly not a reason to hate the language. The values of variables in different contexts is reliable and predictable so long as you don't specifically compromise that. Context and methods of storing/retrieving values in java and perl are different, but both are effective.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Originally posted by Marcus Green:
Factoid: Most of the slash like new products use PHP not perl (see PHPNuke, PostNuke, etc etc).

I suspect that has more to do with the fact that even a blind monkey with no fingers, or a VB or ASP "programmer" for that matter, could bang out a web application in PHP. According to online discussion groups I have seen, many seem to consider Perl too difficult to try to learn, particularly when compared to PHP.

How many millions of programmer hours have been wasted whilst programmers hunt for a phantom variable assignment that
went away due to a misspelling.

They should have written a Perl script to find it.
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
DB:It sounds to me like you have no use for any language that isn't strictly controlled, high-level, object-oriented, or otherwise more modern.
MG: You are reading in meaning I did not express, though I'm certainly in favor of a language that is modern in the sense of supporting the best technology available at the time.

DB: It sounds like the only complaint you can come up with is that by default you are allowed to use variables you haven't declared
MG: No, that was a "for instance". My premise is that Perl is not a good language for signifiant software engineering tasks,and that small tasks have a tendency to turn into big jobs.Just take a look at what the name perl means, "Practical Extraction and Report Language", that is what the creator larry had in mind. He designed it for quick and dirty jobs, not for software engineering. If that is what the creator of the language had in mind, mayby, just maybe that is a clue to it's virtues.

SB: (the memory argument holds no weight next to the bulkier and slower options that every is writing 'good' code in these days).
MG: Not sure of this reference, I mentioned memory in reference to PHP not Perl.
DB: If you have a problem with that, 'use strict'.
MG: My point was that by default Perl is set to the equivalent of "Use slack" this summarises the whole design of the language. Perl is widely used for web development, it makes it very easy to write insecure web systems. If you have ever seen a phantom user permenently connecting your machine to an IRC system at the other side of the world you will know how important security is.
DB: I could complain that java sucks because the multi-threading system only allows and asynchronous method to have the name 'run()', but I'm not going to because I feel I am able to write effective and well-designed code without feeling the ill-effects of this flaw.
MG: Anyone else understand this example? I don't
DB: You can write bad and good code in any language. The argument that perl is more inviting to non-object-oriented masterpieces is a valid point, but an unproductive one and certainly not a reason to hate the language. The values of variables in different contexts is reliable and predictable so long as you don't specifically compromise that. Context and methods of storing/retrieving values in java and perl are different, but both are effective.

MG: It is true that you can write bad and good code in any language, but some languages actually facilitate good code. Pascal requires you pre-declare variables, you will never accidently create a variable due to mis-spelling, the structure of Java means you are far more likely to include exception handling. People used Perl for web site creation because they had nothing better at the time, there are better solutions now. Don't take my word for it, go to any job search engine and type in the keywords Perl and then java you will find vastly more Java jobs than Perl jobs. People are voting with real money for other technologies.
Marcus
------------------

http://www.jchq.net Mock Exams, FAQ,
Tutorial, Links, Book reviews
Java 2 Exam Prep, 2nd Edition by Bill Brogden and Marcus Green
=================================================
JCHQ, Almost as good as JavaRanch
=================================================
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I have never found an occasion where I wanted to put a Perl program into a production environment. Perl is fine for... well, not much really. If I ever feel a need for Perl, I use Korn and it takes half the time. The language was designed to be a Unix admin's tool. We don't even need it for that anymore.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

That's what I was going to say before Thomas jumped my claim.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
DB:It sounds to me like you have no use for any language that isn't strictly controlled, high-level, object-oriented, or otherwise more modern.
MG: You are reading in meaning I did not express, though I'm certainly in favor of a language that is modern in the sense of supporting the best technology available at the time.

You're main problem seems to be the ability to write really bad code easily. You mention PHP and C. Why not add LISP and Smalltalk for unreadability and EcmaScript for not requiring declared variables and C++ for having operator overloading and an all too powerful preprocessor and XXX for ... The fact that your complaint is about code integraty would also suggest your emphasis on a strict, object-oriented language.

DB: It sounds like the only complaint you can come up with is that by default you are allowed to use variables you haven't declared
MG: No, that was a "for instance". My premise is that Perl is not a good language for signifiant software engineering tasks,and that small tasks have a tendency to turn into big jobs.Just take a look at what the name perl means, "Practical Extraction and Report Language", that is what the creator larry had in mind. He designed it for quick and dirty jobs, not for software engineering. If that is what the creator of the language had in mind, mayby, just maybe that is a clue to it's virtues.

Have you heard the things Larry has said comparing perl to Java and C++? He thinks it's better from every prospective for projects large and small. He has also called the acronym, made up long after the language name, "Pathologically Eclectic Rubish Lister" which, unlike the name you listed, actually seems to imply that the langauge was not intended for well-written code, however I believe his main use for the second name is humor.

SB: (the memory argument holds no weight next to the bulkier and slower options that every is writing 'good' code in these days).
MG: Not sure of this reference, I mentioned memory in reference to PHP not Perl.

I was talking of PHP as well. Php is only growing in popularity. Why? Because it works.

DB: If you have a problem with that, 'use strict'.
MG: My point was that by default Perl is set to the equivalent of "Use slack" this summarises the whole design of the language. Perl is widely used for web development, it makes it very easy to write insecure web systems. If you have ever seen a phantom user permenently connecting your machine to an IRC system at the other side of the world you will know how important security is.

The default laxness of perl is because it is designed to make short tasks easy to make. You can write perl one-liners and quick scripts without worrying that you'll misname a variable somewhere. The language design keeps the fact that perl is often used for quick scripts in mind, making it more efficient for those scripts. As for security, perl's system of tainted variables is quite a good idea. Again, you can write insecure programs in any language and I don't see why perl would facilitate this more than Java, C, ASP, or others.

DB: I could complain that java sucks because the multi-threading system only allows and asynchronous method to have the name 'run()', but I'm not going to because I feel I am able to write effective and well-designed code without feeling the ill-effects of this flaw.
MG: Anyone else understand this example? I don't

I was reffering to the fact that you only listed one insignificant gripe that no perl programmer would ever complain about -- they'd be more likely to praise perl's flexibilty when compared with stricter options

DB: You can write bad and good code in any language. The argument that perl is more inviting to non-object-oriented masterpieces is a valid point, but an unproductive one and certainly not a reason to hate the language. The values of variables in different contexts is reliable and predictable so long as you don't specifically compromise that. Context and methods of storing/retrieving values in java and perl are different, but both are effective.

MG: It is true that you can write bad and good code in any language, but some languages actually facilitate good code. Pascal requires you pre-declare variables, you will never accidently create a variable due to mis-spelling, the structure of Java means you are far more likely to include exception handling. People used Perl for web site creation because they had nothing better at the time, there are better solutions now. Don't take my word for it, go to any job search engine and type in the keywords Perl and then java you will find vastly more Java jobs than Perl jobs. People are voting with real money for other technologies.

This refers back to the fact that you only seem to like strict object-oriented languages. There are billions of problems to be solved with software. Going through the XP programming method is one way to go about finding a solution, but it is certainly not the only way. I find C++ to be a wretchedly designed language, sacrificing all that was good about C -- yet I often find that C++ is the best way to do what I want. Perl allows great solutions for many, many problems. It is probably not the language you would want to use to write an office suite in, but it is a very powerful tool for writing things like content management systems, web forums, utility scripts, text processing programs, and millions of other things.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Michael got in that post right before mine. I just want to mention as a side note that only on JavaRanch can I be arguing with the authors of popular Java books
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
"arguing with the authors of popular Java books"... Hmm...
Actually I am not even sure that we can call Perl "programming language"...
---------------------------
Mapraputa Is,
co-author of Mike Meyers' Java 2 Certification Passport,
bartender and troublemaker


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
permaculture playing cards
 
subject: Who love Perl here?
 
Similar Threads
Happy Halloween, JavaRanch...
People of JavaRanch
Which part of Java is sexy for you?
reading in a csv file
any C lover here?