Hi Everyone,
Maybe you've read my last thread about the basedir problem, fortunatelly I'm able to fix that. But now I realize that another problem has pop up. When I use this script on my Window NT server, it seems doesn't recognize some of the commands in the code, under the 'sub get_files' method. It doesn't read the 'pwd' and 'ls'. Below is a fragment of Matt's simple search scripts. By the way, this problem works perfectly on my own website(on the Internet).
Does this mean that the code is only suitable for UNIX but not Window NT? If so, what adjustment do I have to make in order to make this piece of script works on Window NT server? Thank you very much!!
best regards,
Rowina
sub get_files
{
chdir($basedir);
foreach $file (@files)
{
$ls = `ls $file`;
@ls = split(/\s+/,$ls);
foreach $temp_file (@ls)
{
if (-d $file)
{
$filename = "$file$temp_file";
if (-T $filename)
{
push(@FILES,$filename);
}
}
elsif (-T $temp_file)
{
push(@FILES,$temp_file);
}
}
}
}
Maybe you've read my last thread about the basedir problem, fortunatelly I'm able to fix that. But now I realize that another problem has pop up. When I use this script on my Window NT server, it seems doesn't recognize some of the commands in the code, under the 'sub get_files' method. It doesn't read the 'pwd' and 'ls'. Below is a fragment of Matt's simple search scripts. By the way, this problem works perfectly on my own website(on the Internet).
Does this mean that the code is only suitable for UNIX but not Window NT? If so, what adjustment do I have to make in order to make this piece of script works on Window NT server? Thank you very much!!
best regards,
Rowina
sub get_files
{
chdir($basedir);
foreach $file (@files)
{
$ls = `ls $file`;
@ls = split(/\s+/,$ls);
foreach $temp_file (@ls)
{
if (-d $file)
{
$filename = "$file$temp_file";
if (-T $filename)
{
push(@FILES,$filename);
}
}
elsif (-T $temp_file)
{
push(@FILES,$temp_file);
}
}
}
}