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

Are older versions of perl compatable with perl 5? Here is the heading portion of a perl script I'm moving over to a server which is running perl 5:
require("cgi-lib.pl"); print &PrintHeader; &ReadParse;
Will code written using this older version (I'm not sure what version it was run on) run on using a newer perl version? If not, what do I need to consider to upgrade the script (sort-of-speak)? Thanks. Chris

Replies are listed 'Best First'.
Re: Mixing old and new perl versions
by ysth (Canon) on Aug 25, 2005 at 02:09 UTC
Re: Mixing old and new perl versions
by CountZero (Bishop) on Aug 25, 2005 at 11:51 UTC
    A good book on transforming/updating/upgrading old code is Perl Medic.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: Mixing old and new perl versions
by ww (Archbishop) on Aug 25, 2005 at 13:08 UTC
    cgi-lib.pl is deprecated by some; was standard, but (wisely and widely) supplanted by CGI.pm. Scripts using cgi-lib should be suspected of representing legacy (and potentially insecure) code.
    see perlman:lib:CGI