Advertisement

12.18.2003 at 02:26AM PST, ID: 20829217
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Copy Guestbook to new directory and change variables.

Asked by QUESTOMNI in Perl Programming Language

Tags:

Hello,
How do I copy guestbook.cgi to new directory and change variables in the guestbook to indicate the directory it is presently in?

For example;
#I read GUESTBOOK in present directory with GUESTBOOK_PROCESSOR. I copy it to new directory with GUESTCGI. I need to change variables:

$guestbookurl = "https://supersys2000.com/CYCLONE/index.html";
$guestbookreal = "/home/userid/public_html/CYCLONE/index.html";
$guestlog = "/home/userid/public_html/CYCLONE/guestlog.html";
$cgiurl = "https://www.supersys2000.com/CYCLONE/guestbook.cgi";
$counterlogurl = "https://supersys2000.com/CYCLONE/counterlog.html";
$counterlogreal = "/home/userid/public_html/CYCLONE/counterlog.html";

############To

$guestbookurl = "https://supersys2000.com/CYCLONE/$FORM{'user_id'}/index.html";
$guestbookreal = "/home/userid/public_html/CYCLONE/$FORM{'user_id'}/index.html";
$guestlog = "/home/userid/public_html/CYCLONE/$FORM{'user_id'}/guestlog.html";
$cgiurl = "https://www.supersys2000.com/CYCLONE/$FORM{'user_id'}/guestbook.cgi";
$counterlogurl = "https://supersys2000.com/CYCLONE/$FORM{'user_id'}/counterlog.html";
$counterlogreal = "/home/userid/public_html/CYCLONE/$FORM{'user_id'}/counterlog.html";


#####What do I do to the script below to make the changes in variables? SO GUESTBOOK WORKS IN PRESENT DIRECTORY. $FORM{'user_id'} is from addguest.html form. I use the input to create new directory.

########################################
mkdir( "$FORM{'user_id'}", 0755)  or dienice("Couldn't open $FORM{'user_id'} for writing: $!");

########################### Write to $FORM{'realname'}/survey.out############
open(QUESTF,">>/home/userid/public_html/CYCLONE/$FORM{'user_id'}/survey.out") or dienice("Couldn't open survey.out for writing: $!");

chmod 0644, "/home/userid/public_html/CYCLONE/$FORM{'user_id'}/survey.out";


close(QUESTF);

########################### Write to guestbook.cgi #############

open(GUESTBOOK_PROCESSOR, "guest_process4.txt") or dienice("Can't open guest_process4.txt: $! \n");

my $string = <GUESTBOOK_PROCESSOR>;

my @words = "$string";

open(GUESTCGI,">/home/userid/public_html/CYCLONE/$FORM{'user_id'}/guestbook.cgi") or dienice("Couldn't open guestbook.cgi for writing: $!");
while ($string = <GUESTBOOK_PROCESSOR>) {

chomp($string);

@words = "$string";

print "@words<br>\n";
print GUESTCGI "@words\n";
}

close(GUESTBOOK_PROCESSOR) or dienice( "Can't close guest_process4.txt: $! \n" );
close(GUESTCGI) or dienice( "Can't close guest_process.txt: $! \n" );Start Free Trial
 
Keywords: Copy Guestbook to new directory and …
 
Loading Advertisement...
 
[+][-]12.18.2003 at 03:43AM PST, ID: 9963417

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.18.2003 at 03:47AM PST, ID: 9963428

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.19.2003 at 07:57AM PST, ID: 9972882

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: hello
Sign Up Now!
Solution Provided By: ZeroPage
Participating Experts: 2
Solution Grade: A
 
 
[+][-]12.28.2003 at 06:43AM PST, ID: 10007403

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.28.2003 at 07:10AM PST, ID: 10007452

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.01.2004 at 12:18PM PST, ID: 10248221

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.09.2004 at 10:18AM PST, ID: 10312680

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32