Home: Perl Programming Help: Beginner:
Multiple Scripts



stanley
Novice

Apr 22, 2001, 10:43 AM


Views: 357
Multiple Scripts

Let's say I have a text file search script and I duplicate the script into two scripts call it "search1.cgi" and "search2.cgi", and both scripts will read the same text files. Do you think it will make any different to the search performance and would it corrupts the text file?

Thanks.



zanardi
journeyman

Apr 22, 2001, 11:29 AM


Views: 354
Re: Multiple Scripts

It depends on your code/methods and how well you built the script that determines how it will preform. And in what ways would it corrupt your text files... Is your search writing to them?

----------------------
Fueled By ZCom


stanley
Novice

Apr 24, 2001, 7:30 AM


Views: 341
Re: Multiple Scripts

No, the script doesn't write to the text files, but if both scripts wrting to a same log file, what should I do? Should I using file locking or something else?

The reason why I use two running scripts, because I am thinking it would increase the speed, let's say a user query first word in search1.cgi and second query will goes to search2.cgi, third query will back to search1.cgi....am I making any sense here?

Please advice,

thanks.