Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
Perl Programming IT Technology

Perl 1.0? 92

Posted by timothy
from the ur-camel dept.
James A. A. Joyce writes "The title says it all. There's a tiny blurb over at dev.perl.org. Download Perl 1.0 here, for all of those nostalgics in the Slashdot audience! It's only 263KB, so why not give this piece of 1980s computing history a try?"
This discussion has been archived. No new comments can be posted.

Perl 1.0?

Comments Filter:
  • "The camel has a single hump; The dromedary two; Or else the other way around. I'm never sure. Are you? -- Ogden Nash"
  • by gooru (592512) on Sunday August 03, 2003 @06:44PM (#6602250)
    so why not give this piece of 1980s computing history a try?

    Because I can't actually do anything with it?
  • eh (Score:4, Funny)

    by Anonymous Coward on Sunday August 03, 2003 @06:56PM (#6602317)
    so why not give this piece of 1980s computing history a try?

    Or yould do as the C programmers do and still be left in the 70's.
    • Re:eh (Score:1, Troll)

      by GnuVince (623231)
      If I had points, I'd mod you "Insightful". It's true, C has not evolved much (except for libs) since the 70's. Time to move to the 21st century please.
      • Re:eh (Score:1, Offtopic)

        by adelton (50213)
        Why move anywhere? It's perfect.
      • Re:eh (Score:2, Informative)

        by tomstdenis (446163)
        It hasn't radically changed but it has changed none the less.

        We don't use K&R style function parameters. I'm rather certain various keywords are new [and deprecated like "auto"]. The language is actually a standard now, not just a "works on my compiler".

        I can't really see a valid argument for most newer languages. For example, often people argue "with Java you don't need to recompile to run it elsewhere". But that isn't actually a feature of the Java language. It's a feature of the Java runtime e
  • by James A. A. Joyce (681634) on Sunday August 03, 2003 @07:10PM (#6602389) Journal

    Before I continue, I'd just like to point out that on the offchance that something goes wrong with regard to dev.perl.org, I uploaded a copy before the article was posted [lycos.co.uk] in case of Slashdotting or if you just want to use a mirror.

    With that out of the way, there's a few limitations of the language which I found quite interesting:

    • There's no switch statement
    • There are no hash table variables (i.e. those beginning with a '%')
    • No support for recursive subroutines
    • And yes, Larry does say that Perl "actually stands for Pathologically Eclectic Rubbish Lister, but don't tell anyone I said that." Oh. Oops.

    Oh, and when you download the package and untar it all into a directory, it won't work out of the box. Here's some instructions on how to make it work on Red Hat Linux system. First, untar it all into one big folder. Then, run ./Configure and just press Enter. When 'make depend' has run, you need to edit the Makefile. Open the Makefile up in your text editor and get rid of all the lines containing either '<built-in>' or '<command line>'. Then you should be able to just do 'make' and you now have a copy of Perl 1.0 as ./perl in the current directory.

    • by QuMa (19440) on Sunday August 03, 2003 @07:28PM (#6602500)
      There still isn't a switch statement you know... Well, not in perl 5 anyway. There'll be one in perl 6.

      (oh, 5.8 has "use Switch;", but that's cheating)
      • bah, switch is for people who are scared of using if... Incidentally, perl does have a nice alternative. Prepare a hash with all the possible values used as keys, and then use references to functions to do what you want to do.

        For instance:

        #!/usr/bin/perl

        use strict;

        sub reply_y { print "You code too much perl!\n"; }
        sub reply_n { print "You don't use enough perl!\n"; }

        my %switch = ( 'y' => \&reply_y, 'n' => \&reply_n };

        print "Would you use a hash as a switch statement? (y/n) ";
        my $answer

        • Things like this tend to become unreadable.
          And thats different from 99% of perl code out there how?
        • Nothing wrong with dispatch tables. Very maintable in my opinion.
        • See, now I'd inline the whole table if you're only using it once:


          print "Would you use a hash as a switch statement? (y/n) ";
          my $answer = <STDIN>;
          if ($answer !~ /^[yn]$/i) {
          print "You've reached the default\n";
          } else {
          chomp $answer;
          {
          'y' => sub {print "You code too much perl!\n";},
          'n' => sub {print "You don't use enough perl!\n";}
          }->{lc $answer}->();
          }
          • As long as you're simplifying the example, if it's just printing strings, why use subs?

            print "Would you use a hash as a switch statement? (y/n) ";
            my $answer = ;
            if ($answer !~ /^[yn]$/i) {
            print "You've reached the default\n";
            } else {
            chomp $answer;
            print {
            'y' => "You code too much perl!\n",
            'n' => "You don't use enough perl!\n"
            }->{lc $answer};
            }


            You've lost one of the benefits of using a hash, by the way: your check for $answer against 'y' or 'n' isn't tied to the possible values
    • > Forbidden
      > You don't have permission to access /drewt/tgz/perl-1.0_15.tar.gz on this server.

      Could you fix please?
    • As others have noted, 5.8 doesn't have a switch statement either. "Perl actually stands for Pathologically Eclectic Rubbish Lister, but don't tell anyone I said that" also appears in the perl manpage in 5.8, under the Bugs section. I wonder why they still haven't fixed it!
    • by chromatic (9471) on Monday August 04, 2003 @01:08AM (#6603924) Homepage

      There are certainly hashes in Perl 1. See hash.[ch], for example.

      Did you file a bug report [perl.org] for your Makefile issue? Richard Clamp is maintaining this version.

  • wtf? (Score:5, Funny)

    by larry bagina (561269) on Sunday August 03, 2003 @07:12PM (#6602408) Journal
    I submitted this story almost 20 years ago!
  • by quinkin (601839) on Sunday August 03, 2003 @07:54PM (#6602632)
    Ah, Perl 1.0.

    All the power of QBasic, the readability of assembly, and the flexibility of DOS batch scripting...

    (Apol. to all the offended nostalgics :)

    Q.

  • Dupe Post (Score:3, Funny)

    by Anonymous Coward on Sunday August 03, 2003 @10:53PM (#6603501)
    It has to be, it's 20 years old.

    Oh, how about this:

    I know slashdot is behind the news, but this is ridiculous. :)
  • I thought perl was released december 18th...
    Did I miss something?
  • Ack!!! (Score:5, Funny)

    by stevens (84346) on Monday August 04, 2003 @01:00AM (#6603902) Homepage

    As someone who uses perl quite a bit, using this 1.0 gave me a line I've seen before only in my nightmares:

    $ ./perl -w -e 'print "Just Another Perl Hacker,";'
    Unrecognized switch: -w
    $

    Aaaaaggghh! Must ... have ... warnings ...

  • Perl 1.0 (Score:3, Informative)

    by metamatic (202216) on Monday August 04, 2003 @11:16AM (#6606796) Homepage Journal
    "...so why not give this piece of 1980s computing history a try?"

    Because I remember it?

    I didn't consider Perl usable until Perl 5, because that's when it *finally* got lexically scoped local variables... Pretty horrifying that it took four major revisions to get that far.
  • ...
    Run make depend now? [y] ./makedepend
    echo arg.c array.c cmd.c dump.c form.c hash.c search.c stab.c str.c util.c version.c | tr ' ' '\012' >.clist
    Finding dependencies for arg.o.
    Finding dependencies for array.o.
    Finding dependencies for cmd.o.
    Finding dependencies for dump.o.
    Finding dependencies for form.o.
    Finding dependencies for hash.o.
    Finding dependencies for search.o.
    Finding dependencies for stab.o.
    Finding dependencies for str.o.
    Finding dependencies for util.o.
    Finding dependencies for version.o.
    echo

If it happens once, it's a bug. If it happens twice, it's a feature. If it happens more than twice, it's a design philosophy.

Working...