in reply to Back compatibility from v5.6.1 to v5.004_02

I've been stuck on 5.005 here at work for a while.

Here is one thing I've found:
"our" does not work. use "use var" instead

It is not too hard to examine each error and work the problem.

Keep in mind that since you are obviously using two distinct and different perl installations you may be missing needed modules. This would cause you "errors" but they would not likely be related to the different perl distributions. (Yes, there are *some* included modules in 5.6 that aren't in 5.005) To fix, go to cpan.org to 'fill up' on the needed modules.

You might consider upgrading your Perl installation. It's not as hard as you think.

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

  • Comment on Re: Back compatibility from v5.6.1 to v5.004_02

Replies are listed 'Best First'.
Re: Re: Back compatibility from v5.6.1 to v5.004_02
by ysth (Canon) on Mar 02, 2004 at 23:18 UTC
    use vars , not  use var. Example: use vars '$varname', '@varname'; instead of our $varname; our @varname;

    Update: single-quote vars instead of double quote.

      Watch yourself :)
      use strict; use warnings; use vars "$varname", "@varname"; __END__ Possible unintended interpolation of @varname in string at - line 3. Global symbol "$varname" requires explicit package name at - line 3. Global symbol "@varname" requires explicit package name at - line 3. BEGIN not safe after errors--compilation aborted at - line 3.