Need help in understanding thisperl code.

Can any body explains the under given lines of code i have difficulties in understanding it,

my $errorlog = "/var/log/controler.log";

&initLanguage($language);
&launchCbox();
sub launchCbox {

    $scr = Term::ScreenColor->new;
     $scr->clrscr\(\);
    my \($mode\) = @_;
    my $error = 0;
     my $cbox_x = $dog_x \+ 3;

     my $args;
     my %box_args = %\{$args[3]\};
     $args .= "-d " if $box_args\{"debug"\};
     $args .= "-l " if $box_args\{"log"\};
    $args .= "-L ".$box_args\{"language"\} if $box_args\{"language"\};

    if\($mode ne "restart"\) \{ $scr->at\($y_pos,3\)->puts\($x.". ".$txth->getText\("5016"\)\); \}
     else \{ $y_pos = $dog\_y_pos\+3; $scr->at\($dog\_y\_pos\+3,3\)->puts\($cbox_x.". ".$txth->getText\("5016"." "x\($status\_bar_pos-\(length\($txth->getText\("5016"\)\)\+7\)\)\)\); \}

    if\(!$xwindow\) \{ \`perl ./cbox.pl 2>>/var/log/cbox.log $args > /dev/tty9\`; \}
     else \{ \`perl ./cbox.pl 2>>/var/log/cbox.log $args > /dev/pts/2\`; \}
     $error ? &printNOK : &printOK;

}

Kindest Regards,
Raheel.

Hint of the Day: "Use

[/code ] tags (sans the space), or the '#' symbol in the advanced editor to make your source or listing better readable for others."

That said, I can only guess what this code might be doing, as it relies heavily on global variables.
my $errorlog = "/var/log/controler.log";

&initLanguage($language); # I18N / L10N?
&launchCbox();

sub launchCbox {

    $scr = Term::ScreenColor->new; # Enable us to use pretty colors and
                                   # positioning on the terminal
    $scr->clrscr(); # Clear the screen
    my ($mode) = @_;
    my $error  = 0;
    my $cbox_x = $dog_x + 3; # Global. Source unknown. Meaning
                             # unknown.

    my $args;
    my %box_args = %{ $args[3] }; # Same as above
    $args .= "-d "                         if $box_args{"debug"};
    $args .= "-l "                         if $box_args{"log"};
    $args .= "-L " . $box_args{"language"} if $box_args{"language"};

    if ( $mode ne "restart" ) {
        
        # Print at line $y_pos, column 3 of the terminal the translation with
        # the key 5016 (whatever that is)
        $scr->at( $y_pos, 3 )->puts( $x . ". " . $txth->getText("5016") );
    }
    else {
        $y_pos = $dog_y_pos + 3; # Globals again
        $scr->at( $dog_y_pos + 3, 3 )->puts(
            $cbox_x . ". "
              . $txth->getText(
                "5016"
                  . " " x (
                    $status_bar_pos - ( length( $txth->getText("5016") ) + 7 )
                  )
              )
        ); # Write at position $dog_y_pos+3, 3 the content of $cbox_x,
           # the translation for key 5016, and a space (' ') times
           # the position of the status bar minus (about) the length of
           # text #5016
    }

    if ( !$xwindow ) { # If a xterm (or similar) is there, write to one
                       # hardcoded TTY, to another hardcoded TTY otherwise.
                       #Either way call cbox.pl
        `perl ./cbox.pl 2>>/var/log/cbox.log $args > /dev/tty9`;
    }
    else { `perl ./cbox.pl 2>>/var/log/cbox.log $args > /dev/pts/2`; }
    $error ? &printNOK : &printOK;

}

If I had to guess I'd say this code was written by someone who likes to use code generation utilities and is concerned more with appearence than function.