taemid has asked for the wisdom of the Perl Monks concerning the following question:
I am back with my queries. The last query gave me fantastic replies and I have been able ot make much progress.
Now I want to write the results of my quiz into a file - "Results.5"- which is directory which is not in the cgi-bin directory but lies in c:\quiz.
I am using the following code, but I am not able to add the results string "Class 5" (which I am able to write when I am in the cgi-bin directory. I am using windows XP
Where am I making the mistake. Please help. Thanks in advance for reading the mail.#!/usr/bin/perl use CGI qw(:standard); chdir("../../quiz"); my $outfil = ">>Results.5"; flock(OUT, 2); seek(OUT, 0, 2); print OUT "Class 5"; close(OUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to a file which is external to cgi-bin directory
by ikegami (Patriarch) on Jul 21, 2009 at 17:47 UTC | |
|
Re: Writing to a file which is external to cgi-bin directory
by Old_Gray_Bear (Bishop) on Jul 21, 2009 at 18:17 UTC | |
|
Re: Writing to a file which is external to cgi-bin directory
by jethro (Monsignor) on Jul 21, 2009 at 18:32 UTC | |
by taemid (Initiate) on Jul 22, 2009 at 02:20 UTC | |
by jethro (Monsignor) on Jul 22, 2009 at 08:47 UTC | |
|
Re: Writing to a file which is external to cgi-bin directory
by scorpio17 (Canon) on Jul 22, 2009 at 14:13 UTC |