Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Are we obsessed with CGI?

by rinceWind (Monsignor)
on Apr 12, 2002 at 09:29 UTC ( #158532=monkdiscuss: print w/replies, xml ) Need Help??

Recently, I had a conversation on IRC with a fellow London Perl Monger. He was saying that he wanted to improve his perl programming ability, but found much of the discussion on over his head, and most Perl books too easy.

I asked him if he had tried Perlmonks; he replied that he found the monks too CGI and web script centred - which surprised me.

However, looking at SoPW, there is a predominance of CGI questions and issues. I wonder whether this is a reflection of the Perl community as a whole - what percentage of Perl hackers are using the language (just) for web hosting?

I also recall the damage that has been done to the language's reputation by the likes of MSA and its descendents, and I know that many honourable monks are out there trying to fix it and spread the word (see Not Matt's Scripts).

However, there are many other topics of interest to me, am glad to see postings on the following subjects and I will probably ++ a node just on account of its subject.

  • Design patterns in perl
  • The future of the language: P6/Parrot, P5.xx, Rindolf, Ruby convergence
  • Pure dynamic perl - a la Smalltalk
  • Enterprise architectures: P2EE, Soap
  • Natural language parsing
  • Automated install / configuration management: CPANPLUS, PPM, cvs integration

Is it just me, or are there others out there who would like to see Perl being used in a more widespread fashion, not just by web script jockeys?

Replies are listed 'Best First'.
Re: Are we obsessed with CGI?
by cjf (Parson) on Apr 12, 2002 at 09:57 UTC
    Is it just me, or are there others out there who would like to see Perl being used in a more widespread fashion, not just by web script jockeys?

    I'd like to see Perl used for what's it good at doing. This is obviously a lot of things, one of them being writing CGI scripts. This isn't a bad thing, it's what attracts a lot of people to Perl in the first place and enables them to learn what other roles Perl can fill.

    The idea that someone wouldn't ask a question here because they view the site as too CGI centered is silly. If you look around the site and see who frequents it, you'll realize that the chances of a question going over everyone's heads is pretty close to zero.


      in my career of a perlprogrammer for four years now I've very seldom written cgi-Scripts or the like (Just sometimes when I needed a userinterface or something to visualize data. count < 20). I mostly use perl for data-munging, interfaces between datasources or systems and such stuff.

      I am a proud member of the german webforum, and there is about the same... I often have to remind the people that perl is more than just cgi. I've seen answers to questions like "How can I read parameters into variables" as the following:

      use CGI qw(:standard); my $var = param("name");
      and the helped people wondered why it didn't work. Yes, they were writing non-cgi-scripts... And I don't know how many people have installed a webserver because somebody told them they need a webserver to write perl-code :-(

      Best regards,
      perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"

      I used to exclusively use Perl for CGI, but I've found that PHP is much more useful for that application. (IMHO -- don't bother flaming me about this; I've been on both sides of the fence, and I'm not coming back)

      This deeply saddened me, because Perl is such a strong, useful language... so now, I've been forcing myself to use Perl in many other ways, and I've been reaping the benefits. For example, I've written a few applications that write PHP for me. (and in turn, the PHP writes SQL, HTML, JavaScript... and more PHP... yes, a couple of my coding engines write recursively)

      Whenever I need a number of files edited, I use Perl. In short, whenever I need anything that would normally take more time than thought, I use Perl to reverse the thought:time ratio.

        I used to exclusively use Perl for CGI, but I've found that PHP is much more useful for that application.

        I cannot believe that any experienced Perl programmer can be able to like PHP in any way. Have you not experienced the usefulness of strict? Do not you like having modules? Do you like all the parameters being global variables?

        Anyhow, if "code-in-html" is why you choose for PHP, please have a look at PLP, which is perl-in-html.

        - Yes, I reinvent wheels.
        - Spam: Visit eurotraQ.

      Where I work, one guy wrote a perl script that uses a data dictionary to generate sql and C code for out application. The sql that is generated by the perl script is used to create the database based on the data dictionary. This include all the indexes and things like that. Of course there is stored procedures that are made the old fashoned way. The C code is used in the C programming we do. We have a generic table API that you call this function pass it the table name and the operation and the key index (0, 1, 2 etc) and then it fills up a structure that was also generated by the perl script. All this allows us to make changes to the data dictionary then run this script and build new databases out of it. Kinda cool.
Re: Are we obsessed with CGI?
by Juerd (Abbot) on Apr 12, 2002 at 12:09 UTC

    My favourite GUI is a web browser. If you create your program web-based, you can let multiple people use it, and eventually maybe put it online as a public service. Most of my scripts are in a way web based, but I enjoy creating modules as well. When my program is not web-based, it is probably a quick hack (perhaps a command line interface for a web based application).

    A while ago, I wanted to create a simple IRC bot framework, but in the process of creating it, I needed some output, and turned it into a web page for easy markup. I needed input too, so I created some UDP interface for that, and that got a simple web based form so I didn't have to use netcat. A while later, I had it output user lists, to see if my mode hashes were correct. Without really realising it, I created a CGI webchat instead of the IRC bot framework. Oops :)

    Yes, I'm obsessed with web based programming with Perl. But "web based" does not equal "simple minded", or imply stupid solutions.

    How about...

    • Design patterns: how to create a consistent GUI application without event loops?
    • The future: will Perl 6 be as easy to intergrate in a webserver as Perl 5 is? Will it be able to re-execute package code (so scripts no longer have to be inside subs to cache them)?
    • Dynamic perl: templates? autoloading tag subs? dynamic GUI layout?
    • Enterprise architectures: what's the back end for the CGI scripts?
    • Natural language: can we determine what the (obviously clueless :-)) websurfer tries to tell?
    • Automatic installation: when will the first web based CPANPLUS shell be made?

    Yes, I reinvent wheels.

Re: Are we obsessed with CGI?
by Dog and Pony (Priest) on Apr 12, 2002 at 09:57 UTC
    I don't know about the community as a whole, but it is a very common way to be introduced to the language, especially if it is your first programming language. Perl was (or is?) for a long time the web language, and lots of people that get into programming started out with "wanting to do a cool home page". A perfectly valid reason to take up programming.

    Thus, I see it as even more natural that the SOPW questions are web oriented as well, as I assume that a majority of the questions comes from beginners that has just started (or so they say... *grin*). Which is perfect, and exactly why it is there - but I am not surprised at the goals of the beginner perl programmer... :)

    For myself, I started with perl to help administrate a web server, and to play around with what seemed a powerful language. I later have done some web stuff in it too, but so far no complete sites, but rather addons and extras. I still use perl mainly for non-web programming, although I think it is an excellent choice for both. :) Perl has so far never disappointed me in any area that I can recall.

    You have moved into a dark place.
    It is pitch black. You are likely to be eaten by a grue.
Re: Are we obsessed with CGI?
by Molt (Chaplain) on Apr 12, 2002 at 10:01 UTC

    Personally I'm no longer working on CGI work, all the stuff I do is strictly back-end now. It still seems true that Perl is heavily used in the CGI field though, and this is as it should be since in the two years I did spend working in the CGI field I did see just how heavily text-manipulation features in the average CGI programmer's toolkit.

    There are a lot of CGI questions here, yes, but I personally view this as a good point. If people are asking the chances are they're willing to learn, and if they ask here they're likely to be told more correct answers than if they'd asked elsewhere such as the numerous 'Beginning CGI' boards around the net. We don't want to see yet another generation of Matt Wrights here I think.

    Ultimately people ask the questions, and post the articles, which they want to. The articles I'm most interested in are things like integration (XS, Inline etc), design and architecture (Design patterns, refactoring and the like), 'Perl tricks', and overviews of CPAN to point out the modules I may not know about. I'm still happy people post their CGI things though, since it's in no way stopping me from seeing what I'm more interested in, and they're often good reading anyway. Less CGI content wouldn't create more non-CGI content, I think.

    I would like to see Perl used in a more widespread fashion and not just for CGI coding, but the fact remains that CGI is one of Perl's main fortes and is also where a lot of people 'enter the Perl world' and so have more questions. I would be curious to know what proportion of people here use Perl is various ways though!

      To answer your last paragraph:

      I started not directly with CGI but with the problem to make a bilingual (German and English) website (a preprintserver and information about a research group) and to keep the information on both versions consistent. After some selfmade formats we ended up with XML (and XSLT as page generation language (all pages are static, since they change only once a week) so for that no perl was needed).

      A while later, we needed a searchfunction for the preprints, which I wrote in perl, so that was the CGI-part. Now I have some additional scripts, one which generates a part of the announcement email (only a part, because there is always some personal stuff in it), and the last thing a perlscript to make a list of the abstracts of the preprints, with an index by author, which is in LaTeX.

      And at home i wrote a small program together with my sister (her first programming experience in 10 years!) that helps her to cut sequences of letters (usually DNA-sequences), it is very primitive and cuts at the begin and the end.

Re: Are we obsessed with CGI?
by perrin (Chancellor) on Apr 12, 2002 at 14:49 UTC
    Are we obsessed with CGI? No. A quick glance at SoPW shows me a good sampling of what's typically there: questions about databases, memory useage, file system traversal, config files, parsing, speeding up regexes, playing nice with Win32, test scripts, and a whole bunch of other stuff. It's a well-rounded site.

    If your friend wants some interesting reading that has nothing to do with web programming, I highly recommend the Advanced Perl Pogramming and Algorithms in Perl books from O'Reilly. Good stuff.

Re: Are we obsessed with CGI?
by shotgunefx (Parson) on Apr 12, 2002 at 23:17 UTC
    I myself like to see more things like Why I like functional programming. I've been programming for arounnd 13 years now and I picked up Perl about 4-5 years ago now. My first year or two, I would just be banging out an occasion small one-off script. I quickly picked up how to do easy things.

    As I wrote more of these utilities (text munging | CSV| etc), I picked up more and more of the general language symantics. It just hit critical mass one day when I knew enough to appreciate it's unique design. From that point on, my use of Perl just snow-balled. As it got easier to do more and more in less code and shorter times I've become something of a Perl junkie. I've been entertaining getting the shabang line tattooed :)

    I'm always trying to do things in different ways and Perl rarely dissappoints. I've never been much of a writer but I suppose it's the same feeling an author or poet gets appreciating their finished prose.

    I think one of the reasons so many people new to Perl start off with CGI is because it's so easy to pick up that subset and not have to stray far from it.(makes Simple things Simple) I think appreciating it's true range and gaining a modicum of mastery takes time. CGI is just a natural way to be introduced. Another point is that non-trivial CGI is really just regular programming. I write CGI scripts a lot but they are usually more than just simple forms. They're the same type of programs that I write for the command line, just with an html wrapper.

    Contemplating my time here, I would just like to take a moment to say thanks to vroom and everyone else here who helps and contributes to the Monestary. I've learned so much more since our introduction.

    Honestly, I haven't gotten so much mental fuel from something since I discovered Worldcom MCI BBS a decade ago where John Carmack of id Software and Michael Abrash of M$ hung out.
    (Fun OT fact: For the first couple of months writing DOOM, John was actually sharing the source code. He must have gotten rebuked for it as it stopped and all previous messages concerning it and the techniques used were purged. This sounds somewhat familiar. )


    "Did I write all that?"
Re: Are we obsessed with CGI?
by ignatz (Vicar) on Apr 12, 2002 at 14:36 UTC
    Mea culpa, mea culpa, mea maxima culpa

    I have a confession: I have never written or installed a Perl CGI script and I've been using Perl for Web Development for six years now. Mod_perl, networking, yes, but never a good ol bread n' butter CGI script. My first Perl script generated a static web site from an Access database and templates. Hell, no cgi-bin and a 486; what's a guy to do? This worked so well for me that I kept it up for years. (The communities are still created from a perl script of mine that generates PHP files from an Excel spreadsheet. Scary when your cheesy hacks take on a life of their own.)

      `                                                   ` 
Re: Are we obsessed with CGI?
by Silicon Cactus (Scribe) on Apr 12, 2002 at 16:04 UTC

    I don't necessarily feel that we, as developers, are obsessed with CGI. Many times it is our companies that are obsessed with web interfaces.

    It was mentioned earlier in the thread by Juerd that a web browser is his favourite GUI. Many companies feel the same way, not only is it chic right now, but it is also is a way for a hetergeneous environment to collaborate well. My company is very much heading that way for MANY of its internal apps. Why use Outlook calandaring when Outlook is so susceptable to virii, when you can build a robust web calandar that can be used on ANY OS that has a web browser and is more secure?</p?

    I honestly think that this is why so many CGI questions show up. Because that is what our companies really want.

      I agree and would like to add another wrinkle. Have you really looked at most of the boxed and other forms of packaged software out there, lately? Most of it could be replicated with some perl, a web front-end and a database backend.

      I work at a university (as a network/computer support consultant). I was coming at Perl for writing some monitoring utilities (using Lincoln Stein's book, among others). However, while talking this up to one of the students that you tend to cross paths with at a university, he told me how gung ho he was on Perl. He would go so far as to recode his CS projects that were language specific into Perl just to show off the features to his instructors.

      We discussed it for a bit and he was quite convincing. On the outside, you may have to use DHTML or CSS or Javascript to get some of the more polished GUI elements in, but his argument that even that was easier than having to deal with a lot of the GUI toolkits that were out there. He prefered HTML. He had a lot of good points.


Re: Are we obsessed with CGI?
by tachyon (Chancellor) on Apr 12, 2002 at 19:43 UTC

    I would have thought that Perlmonks covers a wide range of Perl areas. SOPW is about 30% CGI related IMHO but this site encompasses far more than that.

    If you Google this site with:

    CGI OR website OR web OR form OR HTML OR HTTP OR LWP OR javascript

    you get about 16,000 pages out of the some 160,000 nodes that make up the current site so only about 10% of the site contains one of these web/CGI related key words




Re: Are we obsessed with CGI?
by abaxaba (Hermit) on Apr 13, 2002 at 07:35 UTC
    I find all kinds of useful stuff on this site [Proud Member since <3 months ag0], and I'm definitely a CGI hacker. But not necessarily in the widely-understood sense (ie, form->email gateways, polls, message boards, etc.)

    I cut my eyeteeth working for a .com, developing a backoffice financial accounting application that just so happened to be web-delivered. But, in this CGI-application, I learned about MD5, DBI/ctlib, pipes, CPAN, UNIX, and all sorts of other "non-cgi" stuff.

    I tell people that I write perl, and they ask about CGI scripts, and I say that I write CGI's, and get the "Oh I see, thanks for playing" kind of response. What I think people outside of the community fail to realize is all of the behind-the-scenes stuff that has to go on in order for robust, web-delivered applications to be written utilizing the CGI. The browser is an awesome GUI, primarily, IMHO, becuase it's a tool that so many people know how to use. Perl is a great server-side language for performing all sorts of things. Throw in Apache, Mod_perl, etc, etc, and the CGI is a virtually indispensable tool.

    just my .02
Re: Are we obsessed with CGI?
by bikeNomad (Priest) on Apr 14, 2002 at 23:26 UTC
    This is something I've noticed on Perl Monks for some time.

    Since I don't do CGIs if I can help it, Perl's capabilities in that realm are irrelevant to me.

    However, Perl is a good general-purpose language. It's also fun to do language experimentation (see Class::Prototyped for example).

    I have an article coming out in Embedded Linux Journal that describes a data acquisition system for scientists in the field; this embedded system uses Perl for its data acquisition, queries, network connectivity, administration (via Webmin), etc. One thing that made Perl better than (say) C in this system was eval "string": to add a new kind of data channel to the system you give the system a small chunk of Perl code that acts as glue between the data acquisition scheduler and the particular sensor or computation you're logging. These can get added at runtime without bringing down the system, without explicit compilation, and they're typically only a few lines.

    Though there were a few CGIs in the system (for configuration), the bulk of the work was done by and BerkeleyDB.

web script jockey crisis
by DaWolf (Curate) on Apr 15, 2002 at 19:04 UTC
    This is a VERY interesting topic. ++rinceWind.

    I use Perl primarily for browser based scripts. Since today most applications connect to internet it's an easyier way to do it, not mentioning it's more cheap to the client, wich means - at least in my country - that you have more chances to get the job.

    I'd LOVE to learn how to use Perl to do more than web-based apps, but all the documentation I've found seems to be too confusing. GTK here, Win32::GUI there and I keep wondering what to use, how to use, "Is there a way to program in perl that can run on a machine that doesn't have the interpreter?"

    I'm writing a pretty small simple app that is DOS based, because of the reasons I've just told you. I'm starting to take some serious thoughts about learning C++ or Java for the same reasons. And the worst thing is that I feel I'm not the only one. It's incredible how the Java market is expanding here in Brazil. I'm becoming affraid to lose jobs because the only lang I know and like to program is Perl.

    I think there is a lack of good and easy to take tutorials and docs about this issue.

    Oh, I'd like to defend Matt a little. I don't know him, but I think we must give him some credit for popularizing Perl. If wasn't for him, maybe I'd never looked into a Perl script and fell in love with it like I did. It was because of the scipts I've found there that I was interested in learning Perl. Since then I'm writing huge web apps, so I'm pretty happy that I've once found MSA.

    Well, that's it, brothers - almost a short version of my programming life :)

    Your tortured-soul-web-script-jockey :)

    Er Galv„o Abbott
    a.k.a. Lobo, DaWolf
      I'd like to defend Matt a little. I don't know him, but I think we must give him some credit for popularizing Perl. If wasn't for him, maybe I'd never looked into a Perl script and fell in love with it like I did. It was because of the scipts I've found there that I was interested in learning Perl. Since then I'm writing huge web apps, so I'm pretty happy that I've once found MSA.

      Remember that Perl was being used for CGI before Matt and his scripts came along. This was because the original webmasters were the same sysadmins who had found Perl to be a great language for all their shell scripting needs.

      Matt may have popularised Perl, but he also did a great deal of damage to its reputation. A large number of people see Perl as a "script-kiddies toy" and as a language to be avoided for writing enterprise level applications. We know they are wrong, but I'm not sure that we'll ever be able to persuade them otherwise.


      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

        he [Matt Wright] also did a great deal of damage to its [Perl's] reputation

        I should probably explain what I mean by contentious statements like that.

        For a significant proportion of people (especially those who aren't career programmers) their first exposure to Perl is seeing one of Matt's scripts. Matt has said that when he wrote the scripts he was just learning to program. Therefore the code in the scripts is often over-complex and difficult to understand. I think this makes a significant contribution to Perl's reputation as a "write-only" language. This isn't helped by the number of people who seem to equate popularity with quality and assume that Matt's scripts are good examples of well-written Perl.


        "The first rule of Perl club is you do not talk about Perl club."
        -- Chip Salzenberg

Re: Are we obsessed with CGI?
by mattr (Curate) on Apr 16, 2002 at 07:23 UTC
    I read some of the archives of and it is interesting. Perhaps part of the thing is that PM answers newbie questions, and there are a lot of CGI people there. Also a lot of the people here use CGI.. but not obsessed. Part may also be that it isn't so easy to see all the recent threads in PM as it is easy to see in the archives or maybe in a thread-following email app.

    Personally I have a problem with PM, and Slashdot, and some other sites in that it seems that a discussion can only last a certain number of hours before it is slated to die a terrible death.. sliding off the bottom of the top page or worse yet, nobody comes back to see later responses because it is difficult to see where last they left off reading. So, it is hard to maintain an ongoing discussion about a single subject, instead it is like having the same subject show up as dupes and rehashed questions over and over again. Would like to work on tools for this.

    I'd like to add to the list of topics I'd like to hear about:

    Bioperl - This is a very cool Perl story!
    Haskell - which we could really use! I'm going to try to learn more about it anyone here use it?
    CPAN selections - groups of modules that work well together for you, and glue code you have that is not returned to CPAN. Maybe we need an anti-CPAN for that stuff that makes it work? Thinking of CGI::Application auth schemes but nope, no CGI on the brain here..
    AI and integration with anything that makes you and your Perl smarter.
    Observations on perl-based community software design
    Successful GUI experiments with Perl, or with something else that contacts a Perl server program
    Perl-based high performance/reliability servers
    More blue-skying and anecdotes about useful Perl implementations and other ways Perl can magnify your brain. Look at theDamian's project page.. could we try to build one of those for our community brain? I'm not asking anyone to become an artist (unless you use the Artistic liscense, right?) but just thinking some persistent discussion and work together could create some very useful tools and neat perl things.

    I tried to cover a little about the GSL the other day Rolling a Biased Die but I think the comment came in too late and it was called "overkill" (no names) despite this being a C implementation of the best algorithm for a common job. Maybe (probably) overkill for the person who asked the question, but I think answers to questions should also try to be relevant to any monks trying to solve these problems..

Re: Are we obsessed with CGI?
by tmiklas (Hermit) on Apr 16, 2002 at 19:48 UTC
    Obsession? No - it's not an obsession! Perl is not CGI-only language (but i know that there are people out there who want others to think that way).

    What Perl really is (IMHO):
    1. Culture
    2. Community
    3. Technology
    4. *something* that we enjoy
    What Perl is not (IMHO):
    1. It's not another Web plug-in
    2. It's not ment to be Web utility (even if it is used this way)
    3. It's not to be underestimated (!!!)
    What do i use perl for?! Most important - management utilities, remote administration and monitoring, data gathering and analysis. Less important - common system tasks (fining files, etc) and managing my Web servers (dynamic content with DBI and some base web-utils).
    Although i often do some CGI scripting and (yes, yes) i do it with perl, becouse it's efficient and simple. I have many small scripts (~90++, and about 1/4 of them are cgi's) to do the dirty work for me.

    Conclusion: I know some basic rules about Java programming, even sometimes use PHP (if i really have to), but i can't do anything about one thing... Perl fits best to *all* of my needs (computer/software related of course) ;->

    Greetz, Tom.
Re: Are we obsessed with CGI?
by robot_tourist (Hermit) on Apr 15, 2002 at 07:19 UTC

    I learnt perl to write another couple of pages for my company's bug tracking system and having seen just how cool it is, I recently wrote my own (very primitive) text based minesweeper game at home! This is not web based, I don't know what widgets to use. I'll link to the code from my home node once I think I won't be embarrased by it.

    I have a wiry brain/each eye a camera. Robot Tourist, by Ten Benson

Re: Are we obsessed with CGI?
by scmason (Monk) on Apr 15, 2002 at 02:38 UTC
    I have found a pretty good use for perl, a desktop evronment. Check out
Re: Are we obsessed with CGI?
by elvolio (Initiate) on Apr 16, 2002 at 04:07 UTC
    I personally haven't done any CGI scripting just yet. I probably will at some point in the not-too-distant future, but just now that's not useful to me. I mostly use it to parse log files and either take some action based on that or just report them nicely. Perl is great, not just because of its text-handling abilities, but also for its breadth of potential responses, much of which comes from the massive module library. General scripting is also nice, such as when I need to automate a repetitive but fairly complex task (eg large batch jobs), it's great. I'm new to Perl from regular shell scripting (Bourne and Korn) and C, and what immediately stands out to me is the module library (compared to shell scripts) and the community, such as Perl Monks and a few other places around the net.

    That said, yes, I think Perl Monks is weighted a bit towards CGI programming, though certainly not exclusively so. For that reason, one of my favorite areas on the site is CUFP, precisely because I like to see what else can be done with the language -- and come to think of it, that area is a good example of how the site isn't too CGI-centric.

Re: Are we obsessed with CGI?
by Dr. Mu (Hermit) on Apr 17, 2002 at 06:17 UTC
    It's only because of CGI that I learned Perl in the first place, and I suspect the same is true for many others. I had purchased Learning Perl out of curiosity, and it just sat on my bookshelf for more than a year. It wasn't until a huge CGI task was thrust upon me that I began to take it seriously and dove in. Of course, now I use Perl for anything and everything -- especially (with Tk) as a replacement for VB.

    Let's face it, Perl may not be the only game in town for CGI, but it sure beats whatever's in second place. So CGI apps will continue to be the first serious stab at Perl programming for a lot of people, having to learn it out of necessity as I did. And if CGI is the major feeder stream of programmers to Perl that I think it is, "web script jockeys" will always seem preponderant: Perl is new to them, CGI is hard stuff for beginners, and Perl Monks is where they come for help.

      You're right that Perl isn't the only game in town. I've used C, Perl, and Java heavily but dropped them for Ruby. See Its only flaws are spotty documentation (often authored in Japanese and machine-translated) and youth (no match for CSPAN). But for small, clean and fast it is a worthy competitor to perl.
What is CGI?
by Rex(Wrecks) (Curate) on Apr 16, 2002 at 18:49 UTC
    I have to date done one website with CGI, (perl and of course) and that was only so that I could learn how to do it a little bit.

    I use Perl mostly for:
  • writing quick test tools for product testing
  • a ton of tools for monitoring network devices (switches, routers, gateways)
  • much log parsing
  • "compiling" little tools for Windows with ActiveState Dev Kit
  • Small frontends for test suites using WxPerl.

    So in my opinione there is much more at this site. The Code section is filled with samples of it.

    Happy experimenting :)

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
Re: Are we obsessed with CGI?
by Reverend Phil (Pilgrim) on Apr 17, 2002 at 14:16 UTC
    Nice topic.
    I fell into perl when my company didn't really have any programmers, and an old perl script needed fixin'. Turned out I was able to troubleshoot it. Then I started learning perl by hacking through that script and eventually getting the right books and finding this website. I've been playing with it for about 3-4 years now, and I've never written (well, completed) a CGI or web app. Most of my work involves taking nasty-looking customer data and quickly turning it into something that our databases or order entry systems find pretty. As I learn more, my scripts extend their capabilities - grabbing files via ftp, parsing data and throwing it into databases, creating reports in excel, emailing them to People Who Care, logging all script activities into a single log file, etc. The more I learn (when I get the chance to) the more I love throwing simple bells and whistles into my scripts. I've recently built an app w/ a GUI, which was (mostly) fun, but still no CGI.

    I've finally gotten the gumption to put together a couple of websites that will need perl functionality, and I discovered the Template Toolkit, which should be fun to play with. I'm looking forward to finally (after 3-4 years) getting into web development and CGI with perl, and I'm thrilled to find out that somewhere between 10 and 30% of the questions that make their way through these gates are going to help me in that journey =)


      The predominance of CGI talk on perlmonks is a major reason why I've never posted here before and only lurk occasionally.

      I first started using perl 8 years ago to build an EDI engine for processing healthcare claims. Its text processing power and flexibility was simply unmatched. It was years before I even got around to writing a CGI script in it. I prefer to use Embperl for that sort of thing.

      Lately I've been using Perl/Tk to write some quick visualization tools. Its quick, its simple, and its cross platform. Integrate with DBI and you have a nice cross platform client/server solution. No worries about retarded browser compatability and viral vulnerability. Pop in Storable and you can have a persistent local cache for mobile or intermittently connected users.

      I've heard good things about Ruby, but learning another obscure immature new language would require more motivation than simple niftiness.

      I'm also interested in using Patterns in Perl. I only see one such module up on CPAN. Looking over the Apocalypses it would seem to be a much easier project to do in Perl 6.

Re: Are we obsessed with CGI?
by Anonymous Monk on Apr 17, 2002 at 16:07 UTC
    i like CGI programming. i find the many projects i can do on the web interesting. but i don't use perl just for CGI.

    examples of my CGI projects: a somewhat-well-scaling flatfile message board, a simple cgi web proxy, a somewhat flatfile search engine (faster than hash dbs), and other things ive forgotten about.

    examples of my non-CGI projects: a dual generation MP3 streamer, a small web server, a simple Ncurses shell (yes for logging into), a variant on one-time pad encryption, a powerful qmail masquerading filter, an AOL Instant Messenger bot, a log parser/alert system, a user registration/login/authentication database, and more things ive never gotten past alpha.

    as you can see, i don't just do CGI. i wish i could stick to one project and make it really good, but i have so many ideas i have to make a new project every week or two. damn that ADHD! what makes things worse is now i've gotten into gaming, so now i have 5 things that occupy my time: studying for computer certifications, trying to get a job, playing multiplayer FPS's, programming, and trying to maintain a social life before i go insane. plus i administrate a 2600 meeting, do small part-time work as a consultant, run a server at a lan party, and now i have to start working out because none of these things involve aerobic excercise.

    ok so that went off in a different direction. what im saying is that perl's strength isn't CGI, it's the code itself; how you use it determines how it'll be seen by others. i can't wait for the first linux perl kernel module }:>
Re: Are we obsessed with CGI?
by Anonymous Monk on Apr 17, 2002 at 16:54 UTC
    I don't think so. Listen, I am amazed to look over the comments and NOT see remarks from sysadmins. So, I will let a yell out to all the perl monks on this site and say that I use Perl for mostly system related scripts dealing with automating string replacement and text file manipulation (conf files and such). I still use a lot of shell scripting but in general I find that a great deal of tasks needed for maintaining Unix systems revolve around keeping track and editing various configuration files. Perl is the bomb for manipulating files and their contents. I also use it user prompt scripts especially when using password validation against an encrypted string. In addition command line scripts for producing report input based on database information is quickly done when using the DBI mod. If I need something beyond the confines of stringing together Unix commands, I use Perl. And, it seems from my experience it is what most system admins use when faced with the same situation.
      Let me jump on the Admin wagon. Perl does it all!

      I have used Perl to create report scripts, configuration scripts, monitoring scripts and yes have used it for CGI. I think that the best thing about Perl is it's power and ease of use. I have been able to create file replication monitoring services to test the publishing and replication of files and alert on failures, or even the backup replication service that I created. (I didn't administer the replication servers and will leave it at that.)

      How about the database driven asset management, documentation and publishing system that I developed? Perl scripts that collect data from servers, cgi web interface, Perl/TK gui interface that worked on all of the workstations regardless of OS, and don't forget the server that the GUI connected to which handled the logging and actual publishing to the production servers from CVS.

      If you are administering ANYTHING, you shouldn't do without it.
Re: Are we obsessed with CGI?
by OldTimer (Initiate) on Apr 18, 2002 at 01:47 UTC
    Nah, not obsessed, rather the opposite.

    I've cut my teeth on some PVCS wrapper scripts, then moved on to database stuff (DBI:Oracle).

    For personal fun and education I did some CORBA and QT stuff and I found that the OO mapping really rocks! (Learning all about Perl shared libs on HP-UX and Sun Solaris in the process)

    Then I used Perl to generate entity classes for Java and C++ using a data dictionary dumped out by some Java code in Data::Dumper format.

    I then took a job with a telecom SW company, where Perl was used heavily for snmp. I also wrote the smidump -perl code.

    Perl is universal duct tape, crazy glue, swiss army knife and first aid kit all into one.

    Not that I have message or anything, but certainly viewing Perl as _the_ CGI solution would be a mistake under several aspects.

Re: Are we obsessed with CGI?
by Popcorn Dave (Abbot) on Apr 17, 2002 at 20:22 UTC
    I started to use Perl strictly for CGI, then once I got in to it, I started to do some elemetary programming with it.

    Personally, I find, that for development and ease, I much prefer doing whatever I can in Perl. I'm a Pascal programmer from the Turbo Pascal 1.0 ( and even JPL Pascal - which was on 3 - 5 1/4" floppies and you had to swap floppies to compile the damn thing! ) and I find Perl is much easier to work with -- usually :)

    As far as Perl for CGI, I find now I'm doing almost no CGI programming, but just Perl hacking.

Re: Are we obsessed with CGI?
by msouth (Acolyte) on Apr 18, 2002 at 16:03 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: monkdiscuss [id://158532]
Approved by tye
Front-paged by trs80
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-05-25 21:18 GMT
Find Nodes?
    Voting Booth?