When I try to copy or delete any file on my PC it now hangs.
CTRL-C, right click, anything like that on any file, hangs my machine.
If I re-install NAV2003, all's OK. Unistall, problem re-appears...
HELP!! I want this monster off my machine :(
Oh for the love of God!
When I test using BINMODE in CYGWin there is NO improvement at all! My testbed is a Windows XP system, but it will run on my ISP which is Unix, so I'm absolutely lost now as to what is a decent way to test if I'm going to improve things...
Grrrr!
vjcyrano,
Yes, the open for the write should have been ">test.txt"! My bad!
Alas I need the data in an array to then step through it ane process it. Once I've process it I then want to write it out again.
Consolidating this array into a single variable though, and writing it out (instead of...
This reduces the io Count from 1600 odd down to just about 600!!!!!
#!/usr/bin/perl
$|=1;
print "Content-type:text/html;charset=ISO-8859-1\n\n";
open DF,"test.txt";
@test=<DF>;
close DF;
my $rec;foreach(@test){$rec.=$_;}
open DF,"test.txt";
binmode DF;
print DF $rec;
close DF;
exit;
Note...
Started with standard open and print... No difference at all (surpisingly)!
I thought SYSOPEN and SYSWRITE were suppose to be more efficient, but alas no!
NOTE: I missed a line out of my example above:-
line 2 = use Fcntl qw(:DEFAULT :flock);
My concern is that maybe on Unix these would be...
I've been doing some analysis of some of my perl scripts...
Take this simple example reading/writing a 1 meg file (with about 3000 lines):-
#!/usr/bin/perl
$|=1;
print "Content-type:text/html;charset=ISO-8859-1\n\n";
open DF,"test.txt";
@test=<DF>;
close DF;
my $rec;
foreach(@test){$rec.=$_;}...
I either want to put a condition around a "use" statement, or not crash if it's not found.
ie: If I have the coding:-
use Net::SMTP;
And that library does not exist I want to be able to condition it, or just not crash...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.