• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Who love Perl here?

 
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Who love Perl here?
i am ok with it but hate the syntax. Just my opinion.
I know people love it.
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Best language ever.
 
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Fei Ng
Ranch Hand
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1246
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i wonder how many perl books i need..
 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


You can write poetry in Perl, and many people have done so.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FEI - I like it, but do not love it.
Good luck on the project.
Regards, Guy
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's not forget that the new version of Java (1.4) has powerful text provessing features just like Perl!
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
=================================================
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what I was going to say before Thomas jumped my claim.
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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

 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic