in reply to When you first encountered Perl, which feature amazed you the most?

I was really amazed that the arguments of a function are a list (@_) and can be accessed like the elments of an array. That was really interesting. I have not seen this in any other language. It reminded me of coding in assembly.
  • Comment on Re: When you first encountered Perl, which feature amazed you the most?

Replies are listed 'Best First'.
Re^2: When you first encountered Perl, which feature amazed you the most?
by afoken (Chancellor) on Mar 04, 2025 at 19:20 UTC
      JavaScript is much younger than Perl, and Brendan Eich admitted that he was influenced by Perl.¹ Perl was THE dominating scripting language back then.

      It's also easy to prove if you list the semantic similarities.

      It's just the syntax that has to be similar to Java because of the joint venture of Netscape with Sun Microsystems.

      Brendon was originally hired to implement a Scheme (Lisp) based integrated language, similar to what was the case with Auto CAD and Emacs. (So one might argue if it's just a feature Perl copied from Lisp.)

      Emacs was the (or one of the first) apps to come with an integrated high level scripting language and it proved to be extremely productive.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

      ¹) I read it once in an interview but I can't find it anymore.

      There is a tendency to punish Perl with silence, to weird it mildly.

      The WP page of JS doesn't list Perl as influence, tho even the comments in the code base cite perl.

      Most clearly with

    • Array methods which are named like in Perl (pop, etc)
    • String matching methods
    • Perl 4 compatible Regexes
    • "Strict mode" (later add on)