Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Rolling into Perl

by robartes (Priest)
on Oct 15, 2002 at 09:47 UTC ( #205308=perlmeditation: print w/replies, xml ) Need Help??

Encountering the camel

Or - how and why did you start using Perl?

I've been wondering about something lately - how do people roll into using Perl?There Is, of course, More Than One Way To Do It, but I have always thought that by far the most common way of starting to use Perl was sort of accidently rolling into it and sticking.

Now, I'm a system administrator by trade, and for this kind of critter, Perl is a godsend. Among many other things, Perl is the ultimate glue language for lazy persons, and sysadmins are nothing if not lazy and called upon to glue stuff together. So, my own path to Perl was one of looking for a tool to automate some stuff, discovering this funny language that had some connection to a humpy mammal and never looking back again. I guess that for many administrators out there, this is exactly the way they started using Perl.

However, I'm not so sure that this is the way other people start using Perl. We have, for example, heard of a prof in comp sci using Perl in the curriculum (however awkwardly), and this is not rolling into Perl by any definition. OK, said prof was probably using Perl because it is as good an introduction to general programming concepts as any other, but that post got me thinking about entry paths into Perl programming. Hence this meditation.

In a way, this also touches upon the way Perl is seen in the Real World out there (the one with three piece suits, scary monsters and marketing departments): is Perl still seen as the ultimate glue language - but only that - or has it grown beyond that.

I realise I'm stepping on thin ice here, but what's the monks take on this? How did you get into Perl and how does this tie into the perception of Perl in Life, the Universe and Everything?

CU
Robartes-

Replies are listed 'Best First'.
Re: Rolling into Perl
by Abigail-II (Bishop) on Oct 15, 2002 at 10:19 UTC
    It was in a long forgotten era. Apache didn't exist yet. Mosaic ruled the webbrowser market, Netscape had just released its first betas. Microsoft was thinking they could ignore the existance of the Internet. Eternal September had only just started. Life was still good.

    A division of a very large consumer electronics company wanted to have a website. All they had was a corrupted (ASCII) dump of a database, with lots of typos and a CD-ROM with images of their products. We had 160 hours to create a website.

    I created a large bunch of shell and AWK programs that would create the website out of the database dump and the CD-ROM. Running time: over 3 hours to generate about 500 html pages and a 1000 images. (They came with a new dump and new images the day before we went "life")

    After that, I was sure it could have been done better in a different language than sh and AWK (although you can do pretty amazing things in AWK if you know it well). Hence, I learned myself Perl. I had 4.036 on my computer, but after less than an hour playing with it, I wanted to use multidimensional arrays. Not supported by 4.036, so I joined the Usenet group, realized there was perl5, downloaded it, and started studying the manual pages.

    I've hardly used another language since.

    Abigail

      Unbelievable Abigail-II!
      That's almost exactly how I got into this as well, in the time of Spry Mosaic (with an external app to view JPEGs and you couldn't edit files and view locally, they had to be posted online before you could view the results). My boss, ever the impetuous sort went out and bought a machine for hosting, handed me a CD with a large collection of art/typographical stuff that we where involved with and said, "get this online by the end of the week".

      New change of underwear please... ;^)

      I used Perl (at the suggestion of a very good friend of mine) who had been using it for JANet projects for a number of years, and immediately 'fell for it', frankly I just loved it, it also saved my bacon as we got the site up and running within the time allowed by my boss. As it turns out the site was a roaring success, highly accoladed by the design magazines of the era and I stuck with the Web and programming Perl because of that project.

On reminiscing
by merlyn (Sage) on Oct 15, 2002 at 14:03 UTC
    It's a long story, so I'll have to be brief to fit into this tiny 32K box... {grin}

    I was a big user of rn in the 80's. I worshiped Mr. Wall from afar. Anyone who could write a 30-page manpage and have it make sense was All Good.

    I saw Perl 1 go by in comp.sources.unix in 87. Pulled it down. Compiled it. Stared at the manpage a bit, and said "naah, I know awk better than this" (I was doing 1000-line awk programs!) and set it aside.

    But along came Perl 2. Downloaded it. Started playing with it. "Hey, this is pretty cool." And one by one, my new scripts were Perl rather than awk/sed/grep/m4/elisp.

    And so I started my advocacy role, which I still hold today. I snuck into comp.unix.questions and comp.unix.shell and started answering questions with shorter Perl answers than the complex shell scripts they were providing: an experience that I had had myself. I did it often enough that eventually people were tagging "No Perl Please!" at the end of each post.

    And then Larry announced on the Perl support mailing list (prior to comp.lang.perl) that he was working on Perl 3. It would be grand. You could reimplement rn in Perl, if you chose (but nobody ever did). And he asked if there were any volunteers that would be on the alpha test team (sort of a "perl 3 porters" group). I jumped at the chance, and provided porting advice and feedback on a few features that were missing or seemed awkward. (I invented the underscore stat handle and the (LIST)[SLICE] during that phase.)

    Then Perl 3 was released to the world. The online documentation went from 20 pages to 64 pages.

    Someone on usenet wondered if a book was in the works, now that Perl had gotten so much more complicated. I publicly offered my services to help with the online documentation, since I had had both a strong writing background (I had a whole shelf of books I'd ghost-written already) and was intimately familiar with Perl 3.

    A system admin at O'Reilly noticed my post, wrote me back privately saying "if you want to write a book, we should publish it", and put me in touch with Tim himself.

    After a brief discussion in email, I invited Larry to work with me on the book. After our first size-up meeting a few weeks later (in a Carrows restaurant in Salem, Oregon, continuing later to his brother's house), I scribbled out an outline, we refined it together, and a contract was signed.

    We worked on the book entirely by email and FTP, spending only about a half hour total on the phone. About a year later, I met Larry for the second time in Dallas in January 1990, where we signed over 200 copies of the new Camel book at the LISA conference.

    That's probably enough early history for this posting.

    -- Randal L. Schwartz, Perl hacker

      Hats off to you merlyn!

      Sometime in the mid nineties I was a regular lurker on comp.unix.shell, I first noticed you for your "useless use of cat" awards (which I dutifully learnt from) then I started to look for your other posts. Since you seemed to know your stuff and you kept talking about this perl thing I decided I better learn about that too. I was a communications technician and unix wannabe with some rudimentary shell/sed/awk etc skills at the time, now I am full time Unix System Administrator and sometime perl programmer. Your posts do make a difference!

      --
      Life is a tale told by an idiot -- full of sound and fury, signifying nothing. William Shakespeare, Macbeth

      Always great to read a bit of first-hand history! Is there any chance we might see a sort of "Perl vets tell the tale" site with a bunch of such some day? I'd love to read how it all happened, and all those personal little anecdotes of things that happened along the way. Maybe as part of history.perl.org or wherever it would be appropriate.

      Makeshifts last the longest.

Re: Rolling into Perl
by fruiture (Curate) on Oct 15, 2002 at 10:07 UTC

    I'm pretty sure that a lot (really a lot) of people roll into Perl via the Web and CGI area. I'm again linking to Idiotic Perl by davorg, which describes the many problems that arise from that fact.

    I, too, got into Perl after HTML and JS and wanted to add "dynamic stuff" and learn something cool. I bought a really bad book and wrote really bad Perl, but I had the luck to meet the "right people" and find the "right resources" (like PerlMonks and Oreilly Books).

    I do not only assume, i know that there are many, many people getting involved with Perl connected to learning HTML. This has at least one funny reason: SelfHTML, the most famous HTML Tutorial in Germany has a chapter called "Perl/CGI" and all the guys that are pointed to SelfHTML, for it is a really good HTML Tutorial and Ressource, at least notice that chapter and directly connect "Perl" with "CGI" and one day they have a look at it. And although the SelfHTML people have improved the "Perl/CGI" chapter a lot with version 8.0 (added -w and use strict and use CGI; plus added explanation that CGI is not Perl), they still have that dangerous headline "Perl/CGI" and the code is still rather dull.

    --
    http://fruiture.de
Re: Rolling into Perl
by sch (Pilgrim) on Oct 15, 2002 at 10:53 UTC

    Like Robartes, I also found Perl through sysadm'ing. I'd been using the normal unix stuff: sed, awk, grep, etc and could roll some fairly mean scripts - but they were convoluted, horrible to debug and horrendous to maintain or modify as user requirements changed.

    And then I came across Perl - can't remember how, either through one of the Usenet groups or through an O'Reilly book - possibly the Camel. And all of a sudden, I'd found the perfect tool - I could do all of the stuff I wanted easily, the code was understandable, and I'd got access to all of this wonderful pre-existing code in the form of modules.

    And that's how it was for a good number of years, basic reporting and the odd occasional file system utility ( I can't believe how long I got by before I found out about the likes of File::Found). Now I'm trying to expand on my understanding of how it can be used for much more. Luckily I stumbled across PM a couple of months ago, and thanks to the great community here I'm increasing my understanding slowly but surely.

    I'm now running a website for my non-IT job, and I've learned stuff like CGI, SQL & the DBI interfaces, and I'm trying to get my head round OO, packages, scoping. I'm not certain that Perl is the perfect language for every situation, but I'm equally certain that there isn't such a beast but that Perl is coming pretty close for most of the stuff I'm involved in.

Re: Rolling into Perl
by rdfield (Priest) on Oct 15, 2002 at 11:27 UTC
    Back in 99 I was writing an RDBMS in C and needed to extend my SQL parser to include sub-queries. I was having a bad time of it until a friend (a guru programmer with a number of OO patents to his credit) suggested writing a hack parser in Perl until I'd got the syntax sorted. So I went out and ordered the Camel Book and "Advanced Perl Programming" and got sidetracked by the beautiful idea of fully dynamic applications (ie the screen/form is not fixed but is customised depending on the user, the reference data and any number of other factors) built on an apache/perl platform. I've never finished any of the above projects (although I've come pretty close a couple of times :) but then again, I don't get paid any money to write Perl or C, so my day job (Oracle DBA) has to take precedence. I must admit though, that my breadth of vision and understanding has increasing enormously after joining PerlMonks: there are just so many Monks with a fantastic understanding of Perl and the related technologies that every day there's something new to learn here.

    I must point out that my initial searches for Perl help on google/deja-news always ended up with the answer in a post from Abigail. So this post also doubles up as a big, public "thank you" to Abigail. And a slightly smaller, but just as public, "thank you" to perrin for providing my first link to PerlMonks (from the mod_perl mailing list).

    rdfield

Re: Rolling into Perl
by bronto (Priest) on Oct 15, 2002 at 12:11 UTC

    It was about 1995 or 1996... I was a Maths student and they introduced my to the World Wide Web internals... I wanted to create some dynamic application for the web, but I only knew Fortran at the time, which was not good for CGIs

    My Numerical Analysys teacher (and UNIX guru at the time) told me I could try Perl. What does it look like?, I asked; and he said Mmmmmh, there is some C in, and some sed and awk, and some shell... it's like a "the best of" collection

    I didn't like the description, but I decided to give it a try. I bought two books (one of which was the first edition of the Camel book) and I started. I found it funny, and I went on.

    Later I become a System Administrator, and I found it so useful that I can't think of many things I can do with another programming language for my job (but, sadly, there are some... :-(

    Ciao!
    --bronto

    # Another Perl edition of a song:
    # The End, by The Beatles
    END {
      $you->take($love) eq $you->make($love) ;
    }

Re: Rolling into Perl
by dreadpiratepeter (Priest) on Oct 15, 2002 at 13:15 UTC
    How I got into Perl is actually a slightly funny story. At the time, circa 1991, I was doing a lot of X-Windows development and so had already fallen in love with O'Reilly . I was perusing their new catalog and ordering some books. I ordered 'Sed and Awk' because I was doing a lot of misc. shell programming and 'Programming Perl' because it looked cool and I like learning new languages.
    The two books arrived in the same package. I picked up the camel book first; the 'Sed and Awk' book remains on my bookshelf to this day, unopened.
    Perl, and the philosophies around it map directly onto the way I think. I instantly fell in love with the language. 11 years later we are still happily married.

    -pete
    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."
Re: Rolling into Perl
by physgreg (Scribe) on Oct 15, 2002 at 11:18 UTC
    I started programming seriously in Fortran as part of a PhD project. My programs produced screens and screens of text output. I often was only interested with the statistics of this output, but the section of interest was always changing.

    So I started to use awk to generate statistics. This served me well for a while, then I wanted to automate my programs. Changing the parameters, running the program, and analysing the output seemed hard (if it is possible) in Awk.

    Then I noticed the Llama book on a colleagues desk. I worked through the first chapter, and soon was happy with what I could do.

    As a result of this, I got a freelance job coding CGI scripts, then moved into PHP/MySQL, and now I am back at Perl.

Re: Rolling into Perl
by Nomis52 (Friar) on Oct 15, 2002 at 11:13 UTC

    My first exposure to Perl was when I wanted a guestbook for my website and ended up at MSA. I wanted to customise it a bit so I had to try and understand all that line noise....

    I got the book CGI programming in C & Perl by Thomas Boutell out my uni library and soon realized there way a MUCH better way to do it. No more parsing form requests by hand!

    For some reason everytime I searched Google for a Perl problem this site came up. After a few visits I decided to join

    Now before I get massively down-voted for mentioning MSA, the script was soon dumped and I wrote my own one using CGI, CGI::Application and HTML::Template :).

    Simon N

Re: Rolling into Perl
by jordanh (Chaplain) on Oct 15, 2002 at 13:34 UTC
    It was 1998. A functional analyst at one of the locations we supported wanted some paper reports that the system was printing daily to be on the Web. I heard Perl was good for such things. I got the Camel and put it together in what was considered record time.

    Other estimates for this simple project by other programmers came in at taking many times longer and I had to learn Perl.

    Reminded me of an experience I'd had 15 years earlier. Management was considering purchasing an embedded systems product for resale. Our group would have to support the product if we bought the technology. We were given a large body of assembly code that was formatted according to the conventions of this oddball postfix assembler this group had written for themselves. We had some commercial cross development tools with an assembler. Management came to the senior programmers and asked if they could convert the oddball assembler to our assembler's format. They came up with huge estimates on the order of 2-4 weeks based on hand conversion. I was asked and I said that it looked like a job for SNOBOL, to which I had had some exposure back in school. I ran out and got Griswold's book on SNOBOL, for reference, and tore into it and had it done and tested (compared the checksum of the generated ROMs we made vs. the ones the other group had made) in 2 days.

    Ahhh... The right tools do make one's life easier.

      I learned Perl in college, it was one of the courses taught. Since then I've been using Perl for system admin stuff.
Re: Rolling into Perl
by valdez (Monsignor) on Oct 15, 2002 at 11:04 UTC

    It was 10th July 1995 when I bought my first Perl book from the bookshop where I worked :) I didn't know a single command of Perl, but wanted to learn it because I knew that it was perfect for web projects. Then in 1998 I was paid for my first work using it: production of 55000 html pages full of VAT rates comparisons from all european countries for an EU committee...

    Ciao, Valerio

Re: Rolling into Perl
by signal9 (Pilgrim) on Oct 15, 2002 at 14:45 UTC

    Looking back, I'm pretty sure a little bird whispered the word 'Perl' into my ear. I had just gotten my first PC having not touched a computer since my Commodore VIC20 was retired so many years before. With BASIC interpreters being my only exposure to computing, I was still operating under the assumption that to own a computer was to program a computer, and I was going to need to get a book on a more modern language than BASIC. At this time, I didn't know about UNIX, or Linux, or really much of anything.

    The Camel was my first book from O'Reilly. I simply strolled into a nearby bookstore - and by 'nearby', I mean the nearest which was 2 hours away - and was immediately struck by an irresistable gravitational pull to that large, blue book.

    Several years later, I use Perl for fun and for profit, and I am fortunate to be able to slip into Camel-inspired reverie as often as I please for both personal and professional satisfaction.

Re: Rolling into Perl
by zigdon (Deacon) on Oct 15, 2002 at 15:06 UTC

    Let's see. Back in '92 or so, I was running a Help desk for a small local ISP. The sysadmin then, asked me to learn Perl, so I could help with with some CGIs he wanted to write. However, at the time, I just didn't feel like it, and told him 'meh'. What a shame.

    Skip a few years forward, I was about to finish my EE degree, and started working for a large semiconductor companey as an engineer. When I started there, they gave me a Spark2, access to a whole room full of O'Reilly books, and two months, and said "Learn whatever you want". I picked up vi, emacs, awk, sed, and perl. We actually didn't use it for CGIs there, but for the "Extracting and Reporting" part of it :).

    A few years after that, when I got my first Sysadmin job (and was introduced to Linux), perl was everything I ever wanted it to be. I don't think I've written in any other language since.

    -- Dan

Re: Rolling into Perl
by Tardis (Pilgrim) on Oct 15, 2002 at 12:18 UTC
    I was but a lowly tech support drone, not well satisfied with my lot in life.

    I talked to the technical director, asking him if he thought it would be useful if I learnt more C.

    "No" he said, "Learn Perl".

    So I did.

    Thanks Chris.

Re: Rolling into Perl
by feloniousMonk (Pilgrim) on Oct 15, 2002 at 16:47 UTC
    I started with Perl a few years ago when the marketing guy at my company decided that he needed a cgi form handler on our corporate website. He used a form handling script which was given to him by his web hosting company, which was a somewhat modified formmail.pl from MSA. Well, the guy learned enough Perl to magle the script into something mroe useful but wanted a "real programmer" to modify it into something better. I didn't know Perl at all but knew C and some other langs, so I gave it a whirl.

    At that time, I learned from Perl in a Nutshell only, and learned enough from that plus perldoc plus web info to know what I was doing and make a fairly safe formmail.pl replacement to fit the requirements. Then I went back to my C coding and forgot about the whole thing.

    Then, my local LUG had a Perl/Tk presentation, with a bit of background on learning Perl and such. I was inspired not only by Perl/Tk but by Perl itself, to the point that I later went on to use Perl wherever possible until this present day.

    The Perl/Tk presentation also had the added benefit of saving me from creating a UI using the C curses lib, I used Perl/Tk instead and made the boss even happier.

    Now, being a programmer in bioinformatics, Perl is not only tolerated but is the preferred language. It's one thing that seems to bridge the gap between the biologists and programmers, a common language spoken by two types of people who don't see eye to eye on many things.

    felonious
Re: Rolling into Perl
by revdiablo (Prior) on Oct 15, 2002 at 20:04 UTC

    A good amount of folks seem to have begun their Perl journey with CGI programming. For me, it was at the opposite end of the web site. I wanted to spider, download, and archive websites. I was aware of wget -r, but there were certain aspects to it I didn't like (How foolish of me! If only I knew the multitude of wget options... of course, I was still learning the ropes of Linux and unix in general at the time).

    I started out writing horrible cargo-cult scripts that did the wrong thing the wrong way. They were ugly, and slow. They were a maintenance nightmare. But they worked! They performed a needed function, and I loved it. I was creating utilities to make my life easier! It was empowering.

    Now I've been using Perl for nearly 5 years. I am able to understand an astonishing (to me, anyway) amount of what I read here and elsewhere, and have begun to actually create what I think is decent code (I still mostly use Perl for the same purpose -- small but highly useful unix command line utilities).

    Compared to my many previous false-starts at learning other languages, picking up Perl was very natural. I think it's an excellent language to learn, if only for the ease with which useful things can be created.

Re: Rolling into Perl
by Popcorn Dave (Abbot) on Oct 15, 2002 at 18:56 UTC
    My introduction to Perl was through CGI also. About 3 years ago I was helping some friends do a website and they had used items for sale that they wanted to be able to update, so I started with the thin blue CGI book, which didn't do a hell of a lot, but picked up Coriolis's Black Book and the Camel book and actually made the thing work for the most part.

    Looking back, it's probably the worst code I've ever written, and someday when I get some free time I'll go back and rewrite the thing.

    After doing that small CGI script, I did a blackjack simulator to gain more practice in Perl but ended up taking a course at the local community college.

    The only problem I have now is that since I've learned Perl, I dream in code, and there is nothing worse than a bug you can't find dream or an infinite loop nightmare. : )

    There is no emoticon for what I'm feeling now.

Re: Rolling into Perl
by smitz (Chaplain) on Oct 16, 2002 at 08:37 UTC
    I think I have a slightly more twisted reason for getting into perl.

    Along time ago, when I was a student, doing a course I hated, (or not doing it, as the case may be), I found myself bored at home, with free internet. So what does a 19 year old eventually get into, once he tires of endless pr0n? No, not perl! Hacking! L33t!
    Actually, I got into Hackerslab.org, an awesome site / game.

    Im not going to tell you what level 14 involved, suffice to say that I needed to learn a programming langage to do it. I quickly taught myself the rudiments of sockets and arrays, and wrote what I still consider the best code I have ever produced. (If anyone's interested, its on perlmonk.org, at /home/smitz/honeycomb.pl)

    And so perl stuck, cos it rules, obviously!

    SMiTZ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://205308]
Approved by Aristotle
Front-paged by gmax
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2022-10-05 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (20 votes). Check out past polls.

    Notices?