ghenry has asked for the wisdom of the Perl Monks concerning the following question:

Dear Master Monks,

In #!/usr/bin/perl -w and use warnings; I asked about the difference between -w and use warnings; and whether the -w switch goes back to Perl 4.

This got me thinking if Perl 4 is still in use?

My guess is yes, because in the computing world, if something isn't broken and is still working, why change it?

I look forward to your stories ;-)

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!

Replies are listed 'Best First'.
Re: Perl 4 still around?
by cog (Parson) on Apr 23, 2005 at 21:01 UTC
    This one comes straight out of my journal, and is the short story of me having to code with perl 4.0.1.8.

    A friend of mine asked me for help with a little bit of Perl to format some output, in a HP-UX, dating from who-knows-when.

    To my surprise, common things didn't work! A BEGIN block, for instance!

    I thought: "Well, maybe it's an old version of Perl... let's try the -v switch"

    $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $

    Wow...

    I did what I wanted to by other means, going around BEGIN, chomp and others...

    Nevertheless, and even though it only lasted for a couple of minutes, it was interesting :-) It's not everyday that I get to look way back into the past ;-)

Re: Perl 4 still around?
by tlm (Prior) on Apr 23, 2005 at 21:44 UTC

    Hey, if you want you can download your own local Perl museum.

    Caveat downloadator: Note that the link above is to a site unconnected with CPAN or perl.org. Install at your own risk.

    the lowliest monk

Re: Perl 4 still around?
by goober99 (Scribe) on Apr 24, 2005 at 04:04 UTC
    I work as student programmer for my college. Recently my college redesigned their entire website. The wanted to keep an archived copy of the old website. The webmaster asked me to write a Perl script that would be run on the webserver, search every file, and replace any absolute links with archive URL. I wrote the script on my computer (with Perl 5.8.4 installed at the time) and emailed it to him.

    As normal with websites, they were running behind schedule. The administration said the new website had to be up on Monday. It was Sunday, and the webmaster was still working on it. He called me Sunday and said the script I wrote would not work. I knew it would be easier to take a look at it myself, so I walked down to meet him in his office.

    He was telnetted into the old webserver, which happened to be a HP-UX server (ironic because of the first reply to this thread). They bought a new webserver for the new website, but it is not much better: Windows Server 2003 (at least it is running Apache rather than IIS though). I tried several things, and I could not get the script to work. Then I thought to type perl -v and found out it was running Perl 4.

    I've only been using Perl for about a year. I had never used Perl 4. Luckily you can find anything on the internet. I found complete documentation for Perl 4 here. I read up on it and rewrote the script for him in about two hours.
Re: Perl 4 still around?
by Fletch (Bishop) on Apr 24, 2005 at 02:52 UTC

    Back in 199{8,9} I had to write some stuff for an installer meant to be used under Tivoli's package manager. It (Tivoli) still was shipping with 4.0.36. Wound up writing code (5.005_03) which generated an install script capable of being run by Tivoli's 4.0.36. *shudder*

Re: Perl 4 still around?
by ambrus (Abbot) on Apr 24, 2005 at 14:45 UTC

    use warnings was added in perl 5.6.0 (AFAIK), and perl 5.005* is still in use at some places (although it does count as obsolate).

    Update: right, I didn't read the post well. Downvote me if you wish.