Slashdot Mirror


A Bunch Of Perl Bits

Couple of Perl Bits fell into the bin worth noting today: dlc writes, "The results of the Perl Poetry Content are in, and are available." If you're into this sort of thing, you'll dig it. A lot of clever stuff there. Course the sonnet generator is probably my favorite... hack it to generate rock lyrics, and I can start a band and record a debut album. ;) If that's not weird enough for you, check out the PerlOS Project. A PerlWM, a PerlSH, and more. It will strike fear into even the most hardened of Perl Monks.

3 of 91 comments (clear)

  1. Re:Why is Perl so popular? by Ranger+Rick · · Score: 5
    after all it adds little to what awk and sed have been doing for years.

    Apparently you haven't used Perl much. :)

    For more complex tasks than a simple CGI script Perl seems unwieldly ...

    Like any other language, you need to plan ahead and design your software, or it's *always* unweildy. The difference is that because Perl has More Than One Way To Do It, there's no accepted "standard" for doing certain things certain ways. If you are organized when you code and turn on things like "use strict", this can be a wonderful blessing, in that it gives you a lot of leeway to do interesting things and to put them just like you want them. If you are a bad or sloppy coder then Perl isn't for you, because it will just make it worse. :)

    Some of the cleanest and best CGI code I've ever seen has been Perl, and some of nastiest, ugliest CGI code has been too. It's all in how you use it.

    As for What is the fascination with Perl in the *nix world?, because everyone is different and for some people it's the perfect language for most everything.

    Frankly, after using Perl, every other language I use seems constricting (and even if well-designed or well-intentioned, usually too verbose... *cough*java*cough*). I can use the same coding practices I would in a constrained/typed/object-oriented language, but I can do a lot more with it.

    Perl doesn't kill code. People do.

    --

    WWJD? JWRTFM!!!

  2. My OS Project by DonkPunch · · Score: 5

    After reading about the JavaOS project and now the PerlOS project, I've decided to start my own OS project.

    DonkPunch hereby officially announces: THE C OS PROJECT.

    That's right, folks -- an entire operating system written in C! Utilities and shells all written in C! It will be the most C-friendly OS the world has ever seen!

    It's a revolutionary idea, I know. In fact, I'm kind of surprised nobody has tried it yet....

    --

    Save the whales. Feed the hungry. Free the mallocs.
  3. Re:Why is Perl so popular? by jbarnett · · Score: 5


    What is the fascination with Perl in the *nix world?

    What is the fascination with automation, quick development in the *nix world? I can do everything from send mail automatically, to parse my log files at 4:00 in the morning with a couple small scripts and crontab. Compared to other OS, *nix with perl/shell scripts can automate and build bigger applications from smaller ones in a quick and effective manner.

    For example, say I want to dial-in to the Internet, download slashdot every morning at 4:00, parse out the crap, format it into latex and send it to my other computer and post it into an sql database. This could be done with *nix and perl in about 3 cans of jolt cola. Name one other OS/launage that could do it in that short of time, and have it work well.

    Try that in .bat VB or VC++ and see how many cans of jolt cola it would take you.

    I can't fathom it - after all it adds little to what awk and sed have been doing for years.

    Uh, have you check out modules in Perl? Can awk or sed interact with a database? Can awk and sed combined send/get email/news? Also if I remeber correctly you can't do basic logic in awk+sed, like 'while' loops and 'if' statements. Also I think awk+sed lack support of things like OOP, arrays, hashes, sub routines, etc..

    Perl is ALOT more then a word parser

    For more complex tasks than a simple CGI script Perl seems unwieldly, and even now technologies such as ASP and JSP are taking over the server-side processing domain.

    Yea Perl is hard, especailly if you look at C, C++, ASM, Java, Perl seems extremely difficult to use. (sacarism).

    .ASP, now there is a winner, with it being all open and everything and not controlled by some greedy company, let me get on that bus (sacarism again).

    I haven't check .jsp yet, so I won't make any comments on it

    Perl is portable, can run Perl on %99.99 of all CGI enabled web servers, what does ASP run on, like 2 maybe 3 servers? Perl can do a hell of a lot more then ASP will ever be able to do, my freind once created a cgi interface to his coffee maker, not really usefull (to anyone but him), but I would have doubts of trying to do that in .ASP. Again, Perl is a REAL programming launage, that can interact with everything from C programs, other perl programs, other perl cgi scripts, coffee makers, databases, network sockets, other Internet services (smtp, pop3, nntp, irc, etc, etc), encrypted data (des, triple des, blow fish, etc, etc) and about any other thing you could possiablly think of

    IMHO Perl has no real domain in which it is better than everything else - so why is it so popular? Can someone please tell me?

    Have you even use Perl?

    1) It is open source

    2) It is Free software (as both in beer and speech)

    3) You can quickly develop programs/scripts

    4) It can "glue" together seemly random and unrelated compounds (ie. sql server and a pop3 email CLIENT, ie. coffee maker and the http protocol)

    5) You can choose your "programming sytle". Hate OOPing? Don't use it. Love OOPing? Your in luck. Like OOPing but hate the rules and interactive between objects? Break the rules.

    6) Does it have words in it? Does it need to be parse?

    7) Does it need to be portable?

    8) Does it have to be working before your jolt cola can goes empty?

    9) Does it have to be fast?

    10) Does it make you laugh when you have more or less "replaced" yourself as a system admin though the use of Perl/crontab?

    11) Is it fun to randomly "glue" odd, unrelated and obsecure things together using perl?

    12)Sometimes a 5 minute Perl script can save you 120 minutes of boring, manual work

    as the saying goes (in the voice of the comic book store owner in the simpsons)

    NOW GO AWAY OR I SHALL REPLACE YOU WITH A 10 LINE PERL SCRIPT USING THE ENGLISH MODULE

    :)

    --

    "`Ford, you're turning into a penguin. Stop it.'" -THHGTTG