The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-19-2009
Raheel Hassan Raheel Hassan is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 1
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.