Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Differences Between Versions of Perl

by BigGuy (Friar)
on May 19, 2002 at 04:09 UTC ( #167602=perlquestion: print w/replies, xml ) Need Help??

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

I have been handed two 1000+ line perl scripts that work fine with the current stable release, but choke on anything 5.006 or previous and told to get them to work in perl 5.006 and previous (not 4). My question is there somewhwere that details what major changes were made between these versions? or can anyone offer some helpful hints as to what the problem might be from their own experience?

"One World, one Web, one Program" - Microsoft promotional ad
"Ein Volk, ein Reich, ein Fuhrer" - Adolf Hitler

Replies are listed 'Best First'.
Re: Differences Between Versions of Perl
by rob_au (Abbot) on May 19, 2002 at 04:18 UTC
    See perldoc perldelta from your Perl distribution or the perldelta pages archived on


      DOH, I new that there should be a simple way to do this. I just didn't think it would be that simple now i feel silly :-) thanks rob_au

      "One World, one Web, one Program" - Microsoft promotional ad
      "Ein Volk, ein Reich, ein Fuhrer" - Adolf Hitler
Re: Differences Between Versions of Perl
by graff (Chancellor) on May 19, 2002 at 05:00 UTC
    I hope that you're not being told to port to older versions that you don't have access to -- the task would be a bit too speculative if you can't test the scripts against particular older perl releases that you can still run yourself.

    Assuming that you only need to port to versions that you have on hand, the obvious starting point is to make a list of the available relevant versions, remove the initial "shebang" line from your scripts, and run them through the older versions like this:

    /path/to/perl5.006/bin/perl -cw script1 > script1.5.006.errs 2>&1 /path/to/perl5.005/bin/perl -cw script1 > script1.5.005.errs 2>&1 etc.
    Store each version's error report in a separate file, then take the union of the messages in all files to assess what damage needs to be done to each script. Or it might be better to work on the intersections -- where multiple versions report the same problem -- fix those first before altering lines that only cause a problem in one version, or that cause different error reports in different versions.

    Don't do any more research on perl version lore than you have to -- just check the line numbers of the error messages, and grep through the perldelta docs for relevant hints based on the errors.

    Bear in mind that some errors may be due to extra modules that are present in your up-to-date perl release but are not installed for the older versions. Adding those modules to the older versions might be tricky (esp. if you have to find older versions of the modules :P).

Re: Differences Between Versions of Perl
by Sinister (Friar) on May 19, 2002 at 14:58 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://167602]
Approved by BigGuy
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-09-25 15:37 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (116 votes). Check out past polls.