Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Trying to use old source code

by sundialsvc4 (Abbot)
on Jul 23, 2018 at 14:03 UTC ( #1219103=note: print w/replies, xml ) Need Help??


in reply to Trying to use old source code

Actually, the Perl(-5) language ranks pretty-close to COBOL in its backwards-compatibility with itself.   Unlike, say, PHP or Python, the language has evolved very conservatively and pragmatically.   You should find that a current version of Perl will understand this code snippet (if the referenced packages are installed), but you should change the fourth line to use strict; use warnings; to turn-on all of the error and warning messages that Perl can produce.   (Otherwise, in some cases, Perl will try to “assume” that you knew exactly what you meant to say and won’t alert you to subtleties that you need to know.   This is a standard recommendation.   Fix the source-code until all warnings disappear.)

Also unlike many other languages, the core functionality of Perl is very small – almost spartan.   But the contributed library is enormous, and much of the language’s functionality is provided in this way.   For example, where both PHP and Python integrate database functionality into the language (and have substantially-changed/deprecated it several times with no alternative), Perl provides not only use DBI but several other interface packages to choose from ... or to use at the same time(!).   (And then there’s use Moose or use Moo!   Click on either hyperlink and prepare to be amazed.)

TMTOWTDI = There’s More Than One Way To Do It™ ("Tim Toady") is very descriptive of the entire philosophy of this language.

This makes the Perl-5 language both very powerful and relatively future-proof.   I spent more than a year re-tooling a massive PHP-5 application to run at all under PHP-7 because the near-sighted designers of that wretched language left me no choice.   Not so with Perl.

TMTORWPRR = There’s More Than One Reason Why Perl(-5) Remains Relevant.™

Replies are listed 'Best First'.
Re^2: Trying to use old source code
by chromatic (Archbishop) on Jul 24, 2018 at 02:29 UTC
    but you should change the fourth line to use strict; use warnings;

    No, this is terrible advice. Please never, ever give this advice again in this context. It's not just harmful, it's actively cruel.

    Also unlike many other languages, the core functionality of Perl is very small – almost spartan

    This is also nonsense.

Re^2: Trying to use old source code
by LanX (Archbishop) on Jul 23, 2018 at 15:20 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1219103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2019-12-14 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?