madhu.gopala has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I'm looking in to pice of code, its giving out error like runaway multi_line and global sysble requires explicit package name. here is the code

<<<<<<< .mine my $newVersion = '1'; my $oldVersion = "2"; ======= my $newVersion = '1'; my $oldVersion = "3"; >>>>>>> .r914
here wat does <<<<<< .mine indicates help me in sorting the problem

Replies are listed 'Best First'.
Re: Multi_line error
by Corion (Patriarch) on May 12, 2010 at 10:42 UTC

    This looks like a failed merge attempt. If you look at the blocks between ===, you will find that both variables are declared twice, but with different value for $oldVersion.

    For an explanation of what Perl sees, see the Perl Documentation on Quotes and Quote-like Operators. But you don't seem to want a here-document there - the << and === and >>> are the remains of a failed/untested merge.

Re: Multi_line error
by ikegami (Patriarch) on May 12, 2010 at 13:57 UTC

    You appear to be using a content revisioning system, attempted to merge two branches, and a conflict arose.

    Imagine the following scenario:

    Change Joe made Original file Change Jane made ... ... ... my $newVersion = '1'; my $newVersion = '1'; my $newVersion = '1'; my $oldVersion = "2"; my $oldVersion = "1"; my $oldVersion = "3"; ... ... ...

    The merge tool cannot safely merge those, so it produced the text you're asking about and expects you to resolve the conflict manually.

Re: Multi_line error
by samarzone (Pilgrim) on May 12, 2010 at 17:18 UTC

    You seem to use SVN for version control system. This happens when you checkout some code, modify it and before you commit it someone else commits the same file. If SVN fails to merge your and someone else's code it leaves different versions of files in the directory where you checked out the code (e.g. script.pl.mine, script.pl.r914 etc.)

    When it happens with me I just remove all the versions of the file (script.*) having different extensions, check out the code again, merge my changes in the updated file and commit it before someone else do it again. :-)

Re: Multi_line error
by cdarke (Prior) on May 12, 2010 at 12:06 UTC
    Looks like the output from a diff program to me, not a perl script.