[thelist] Re: Looping through the results of a one-to-many-to-many query with PHP
Shashank Tripathi
sub at shanx.com
Mon Feb 18 18:03:01 CST 2002
Manish,
I am not sure if you are using a shebang at the top? Something like:
#!c:\perl\bin\perl.exe
Substitute the path of Perl on your machine accordingly, and please make
sure the above is *absolutely* the FIRST line in your program,
completely left flushed so that there is no space before the # sign. In
any case, I guess the following should work for you:
#!C:\perl\bin\perl.exe
$data_file="file.txt";
open(III, $data_file) || die("Could not open file!");
@raw_data=<III>;
close(III);
use CGI qw(:standard) ;
print header();
print "<HTML><BODY><font size=1>";
print "<b>Reading file,</b>: $data_file<p>\n\n";
foreach $myline (@raw_data)
{
print "$myline";
print "<BR>\n";
}
print "</font></BODY></HTML>";
As for flock() on windows, my guess would be that it still doesn't work.
Maybe they have a good module from CPAN for this purpose (search your
PPM for "lock"), but here is a workaround that you may found useful:
http://perl.about.com/library/weekly/aa042899.htm.
Hope this helps!
Shanx
| -----Original Message-----
| From: thelist-admin at lists.evolt.org
| [mailto:thelist-admin at lists.evolt.org] On Behalf Of Manish Sharma
| Sent: Tuesday, February 19, 2002 2:56 AM
| To: thelist at lists.evolt.org
| Subject: Re: [thelist] Re: Looping through the results of
| a one-to-many-to-many query with PHP
|
|
| Hi all,
|
| This concerns running a Perl CGI program on a Windows
| 2000 server. I know Perl very well but have always used
| it on Linux/Unix based servers. However, on Windows 2000,
More information about the thelist
mailing list