ok, it's working for some files but not others, even those in the same directory! it seems chomp helped.
$_=~s/\$db_file_name//g;
chomp $_;
$_=~s/[=';]//g;
$_=~s/\#.*$//g;
$_ =~ s/\$db_data_path/$db_data_path/g;
$_ =~ s/\$db_script_path/$db_script_path/g;
$_ =~ s/"//g;
$_ =~ s/ . //g;
$_ =~ s/ //g;
$_ =~ s/\.\///;
$db_file = $_;
}it's printing:
/var/home/delicia/delicia.com/cgi-bin/public/data/common/menu.db found logins.db and menu.db are in the same directory; both exist and are not empty.
here's excerpt of menu.cfg:
$db_file_name = $db_data_path . "/common/menu.db";
# Full path and file name of the counter file.and logins.cfg:
$db_file_name = $db_data_path . "/common/logins.db";
# Full path and file name of the counter file.i can't see any difference and can't understand why one works and the other doesn't
Code:
if (/\$db_file_name/) { $_=~s/\$db_file_name//g;
chomp $_;
$_=~s/[=';]//g;
$_=~s/\#.*$//g;
$_ =~ s/\$db_data_path/$db_data_path/g;
$_ =~ s/\$db_script_path/$db_script_path/g;
$_ =~ s/"//g;
$_ =~ s/ . //g;
$_ =~ s/ //g;
$_ =~ s/\.\///;
$db_file = $_;
}
Code:
/var/home/delicia/delicia.com/cgi-bin/public/data/common/logins.db not found /var/home/delicia/delicia.com/cgi-bin/public/data/common/menu.db found
here's excerpt of menu.cfg:
Code:
# Full Path and File name of the database file. $db_file_name = $db_data_path . "/common/menu.db";
# Full path and file name of the counter file.
Code:
# Full Path and File name of the database file. $db_file_name = $db_data_path . "/common/logins.db";
# Full path and file name of the counter file.