Hi,
I am trying to change some setting in a script (perl) but i do not understand what does the following statemnet meant:
sub dirlog
{
$mypath = "/xxx/xxx/";
$logpath = "/xxx/xxx";
$dirlogfile = "randomdir.log";
$interval = "0"; # The days that the random dir will be kept;
@tmpoutput = ("one","two","three","four","five","six","seven","eight","nine");
srand(time ^ $$);
$mydir=rand(@tmpoutput);
$tmp_dir=join("/",$mypath,$mydir);
$cmd="mkdir $tmp_dir";
system "echo $cmd > $mypath/cmd; chmod a+x $mypath/cmd;";
system $cmd;
$cmd="chmod 777 $tmp_dir";
system "echo $cmd > cmd; chmod a+x cmd;";
system $cmd;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
if($mon < 10)
{
$mon = "0$mon";
}
if($mday < 10)
{
$mday = "0$mday";
}
$month = ($mon + 1); ##because $mon start from 0##
if(!open(DIRLOG, ">>$logpath/$dirlogfile"))
{ print "Content-type: text/html","\n\n";
print "Can not APPEND $logpath and $dirlogfile !\n";
exit;
}
print DIRLOG $tmp_dir,"\$",$month,"\$",$mday,"\$",$year,"\n";
close(DIRLOG);
if(!open(DIRLOG, "<$logpath/$dirlogfile")) {
print "Content-type: text/html","\n\n";
print "Can not read $dirlogfile !\n";
exit;
}
@dir_lines=<DIRLOG>;
close(DIRLOG);
i wish to know what are the statements highlighted in red means
thanks in advance,
tris