Re: Hitting a line limit while reading a file

2007-03-13 Thread Bill Luebkert
Howard Maher wrote: > I was simply counting the number of lines in a 2 gig file, printing to STDERR > every 10,000 lines to indicate the program was making progress, but the > program stopped at 12,960,000 lines read... an hour and a half later it still > hadn't budged... > What kind of memory

Re: Hitting a line limit while reading a file

2007-03-13 Thread Vladimir Zelinski
A while ago I had a weird problem on Perl for Windows. My program exited from while() loop because of a character in the data file which was treated as EOF. After removing the character from the data file loop continued up to the very end. I didn't have time to investigate the problem and I can't s

Re: Hitting a line limit while reading a file

2007-03-13 Thread Sisyphus
- Original Message - From: "Howard Maher" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 14, 2007 5:34 AM Subject: Hitting a line limit while reading a file >I was simply counting the number of lines in a 2 gig file, printing to >STDERR every 10,000 lines to indicate the program was ma

RE: how to make it to run faster

2007-03-13 Thread Su, Yu (Eugene)
Beautiful!!! It cuts the run time from ~43 seconds to less than 4 seconds for one of my data files! I knew someone out there can do a better job. For this particular purpose, using vec() and bitwise operation instead of unpacking and packing is a much better way. Thank Tobias for this excellent

RE: how to make it to run faster

2007-03-13 Thread Tobias Hoellrich
This one runs about 10-15 times faster on my system. Toggle $useVec to alternate between your old version and the one that uses vec(). Please not that vec() is big-endian. I verified that the output of both versions are identical. Hope that helps Tobias use strict; use warnings; my $header; my

RE: how to make it to run faster

2007-03-13 Thread Bharucha, Nikhil
I believe the pack function is implemented in C so I don't know how much faster you can write it... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Su, Yu (Eugene) Sent: Tuesday, March 13, 2007 3:14 PM To: Perl-Win32-Users@listserv.ActiveState.com Subject:

RE: how to make it to run faster

2007-03-13 Thread Ted Schuerzinger
"Su, Yu (Eugene)" <[EMAIL PROTECTED]> graced perl with these words of wisdom: > I wrote a simple script which did the job, but it was too slow. It > took over 40 seconds on my 5 year old PC. I wonder if there is better > way to make it run faster. A faster processor? :-p Are the 40 seconds o

RE: how to make it to run faster

2007-03-13 Thread Su, Yu (Eugene)
Hi all, I wrote a script to update a binary data file. The file is a 2048x2048 unsigned-short array encoded in little-endian + 8K header. All values should be even. However, there are some data corrupted with odd values. The task is to set all odd numbers to 1. I wrote a simple script which di

What to do when perl.exe bombs???

2007-03-13 Thread Jon Bjornstad
Greetings, I have a large Win32 Perl app using Tk and lots of other modules. It generally runs just fine but occasionally it bombs saying that there was an error in perl.exe. It shows a system dump of some sort and asks if I want to send it to Microsoft.I decline because I doubt that anyone

Re: localtime failing on DST change

2007-03-13 Thread Bill Luebkert
Dial, Joe wrote: > > Hello $Bill, > I love reading your answers to other people's problems. I hope I can > help you. > Microsoft announced that there is a patch to the MSVCRT.DLL which may be > used by the perl executable. > I don't know the windows equivalent to ldd to be sure MSVCRT.DLL is use

RE: localtime failing on DST change

2007-03-13 Thread Chris O
On Tue, 13 Mar 2007, Bill Luebkert wrote: > My 'localtime' function output doesn't reflect DST since the Sunday > changeover. Jan Wrote: >This is expected if you have the TZ environment variable set because >Microsoft didn't release an updated MSVCRT.dll. Works fine for me on windows... but I'm h

RE: localtime failing on DST change

2007-03-13 Thread Jan Dubois
On Tue, 13 Mar 2007, Bill Luebkert wrote: > My 'localtime' function output doesn't reflect DST since the Sunday > changeover. This is expected if you have the TZ environment variable set because Microsoft didn't release an updated MSVCRT.dll. If you don't use TZ, then DST _should_ be correct for

RE: localtime failing on DST change

2007-03-13 Thread Dial, Joe
Hello $Bill, I love reading your answers to other people's problems. I hope I can help you. Microsoft announced that there is a patch to the MSVCRT.DLL which may be used by the perl executable. I don't know the windows equivalent to ldd to be sure MSVCRT.DLL is used by perl, but if it is, then M

localtime failing on DST change

2007-03-13 Thread Bill Luebkert
My 'localtime' function output doesn't reflect DST since the Sunday changeover. System: XP Pro; Perl B811 The earlier DST change time seems to be picked up OK by Windoze clock. There was some mention of the table changes by Microsoft I believe and there is some info at http://support.microsoft.c