RE: numeric vs string scalars...difference?

2004-11-17 Thread Paul Sobey
Hi, Isn't eq a string comparison? Try using == instead: print String compares\n if 45 eq 45.0; # Fails print Number compares\n if 45 == 45.0; # Passes Cheers, Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Rogers Sent: 17 November 2004

RE: Is anybody else having problems with the mailing list?

2004-11-17 Thread Beckett Richard-qswi266
No. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Schuerzinger Sent: 17 November 2004 04:41 To: Perl Mailing List Subject: Is anybody else having problems with the mailing list? I haven't received a message for four days. And I *know*

More Win32::API Help....

2004-11-17 Thread Paul Sobey
Hi All, Can anyone see what's wrong with the following? Doesn't seem to matter what filename I pass in, I still get the same result, error 123 (The filename, directory name, or volume label syntax is incorrect.). As far as I can tell from the debug output, the structs are getting set up

Re: More Win32::API Help....

2004-11-17 Thread $Bill Luebkert
Paul Sobey wrote: Hi All, Can anyone see what's wrong with the following? Doesn't seem to matter what filename I pass in, I still get the same result, error 123 (The filename, directory name, or volume label syntax is incorrect.). As far as I can tell from the debug output, the structs

RE: More Win32::API Help....

2004-11-17 Thread Paul Sobey
You're a genius - thankyou. I wonder why the prototype method doesn't work? Seems a bit frustrating! P. -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: 17 November 2004 13:37 To: Paul Sobey Cc: [EMAIL PROTECTED] Subject: Re: More Win32::API Help Paul

Re: More Win32::API Help....

2004-11-17 Thread $Bill Luebkert
Paul Sobey wrote: You're a genius - thankyou. I wonder why the prototype method doesn't work? Seems a bit frustrating! That whole set of modules is a bit flakey for my taste. I made lots of quick changes to keep warnings from popping up and had lots of trouble with structs and such. You

FW: Remote Stat - Slow??

2004-11-17 Thread Paul Sobey
For those interested, I ended up with this. I have no idea whether it will be threadsafe (need to have a few running in parallel!), but standalone it's really quick - back down to 1s on that WAN link I mentioned. No idea why stat would be so much slower - presumably wading down through perl and

RE: Remote Stat - Slow??

2004-11-17 Thread Ken Cornetet
Here's my filetime to epoch conversion code (it is a bit shorter): sub vtfiletime { my $vt = shift; $vt = substr($vt, 0, 11); # strip off anything past seconds $vt -= 11644473600; # change offset to jan 1, 1970 return $vt; }

Re: Remote Stat - Slow??

2004-11-17 Thread $Bill Luebkert
Ken Cornetet wrote: Here's my filetime to epoch conversion code (it is a bit shorter): sub vtfiletime { my $vt = shift; What's $vt ? There should be 2 32-bit integers coming in. $vt = substr($vt, 0, 11); # strip off anything past seconds $vt -=

RE: Remote Stat - Slow??

2004-11-17 Thread Ken Cornetet
It's passed as a string. -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 12:02 PM To: Ken Cornetet Cc: [EMAIL PROTECTED] Subject: Re: Remote Stat - Slow?? Ken Cornetet wrote: Here's my filetime to epoch conversion code (it is a bit

Re: numeric vs string scalars...difference?

2004-11-17 Thread Paul Rogers
Hi Paul, You are absolutely right. However, the real problem was that I had to dynamically determine whether to use == or eq...thus I needed a way of reliably determining whether a variable was numeric or string. That's where the regex came into play. Thanks, Paul --- - Original Message

RE: numeric vs string scalars...difference?

2004-11-17 Thread Thomas, Mark - BLS CTR
How about 1.02e12? If you want to know if it looks like a number to perl, this might be handy: use Scalar::Util qw(looks_like_number); print Number if looks_like_number($number); Scalar::Util is part of the standard library in 5.8.x, I believe. -- Mark Thomas Internet Systems Architect

Re: Remote Stat - Slow??

2004-11-17 Thread $Bill Luebkert
Ken Cornetet wrote: It's passed as a string. And that would work how with his incoming file time as 2 32-bit integers ? From: $Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 12:02 PM To: Ken Cornetet Cc: [EMAIL PROTECTED] Subject: Re: Remote Stat - Slow??

Re: numeric vs string scalars...difference?

2004-11-17 Thread Paul Rogers
Interesting. I checked the underlying code to Scalar::Util and it does a regex check, but also allows for exponential notation (as you eluded to). If my client's sales data has to be represented by exponential notation, I'm wayyy undercharging them! paul --- - Original Message -

DBI/email not dying right

2004-11-17 Thread Gardner, Sam
Title: Message For some reason, my script (below) isn't dying appropriately (instead, it's just hanging and not returning to the prompt). I changed server/database/etc. The script had formerly also printed out the die message (before I put in the finish and disconnect statements), but still

Max Number of threads?

2004-11-17 Thread John Serink
Hi All: Anyone know what the maximum number of threads a Win32 perl app can spawn? Cheers, John ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Perlse.dll Problem

2004-11-17 Thread Kenneth R. Robinette
Using ActivePerl 5.8.4.810 in a MFC application, I reveive the following message: Invoking main: Error:Win32::OLE(0.1710) error 0x80010105: The server threw an exception in METHOD/PROPERTYGET Connect at (eval 2) line 15 The exception appers to be coming from perlse.dll. The meth Connect

Re: Max Number of threads?

2004-11-17 Thread $Bill Luebkert
John Serink wrote: Hi All: Anyone know what the maximum number of threads a Win32 perl app can spawn? Too easy - just write a loop and count them yourself. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE Collectibles

RE: Max Number of threads?

2004-11-17 Thread Jan Dubois
On Wed, 17 Nov 2004, John Serink wrote: Anyone know what the maximum number of threads a Win32 perl app can spawn? It is somewhere between 60 and 63. Can't remember the exact number... Cheers, -Jan ___ Perl-Win32-Users mailing list [EMAIL

RE: Max Number of threads?

2004-11-17 Thread John Serink
Ha, ha! I knew someone would suggest that. I'm pretty sure it'll bring my machine to its knees before I get to the max...assuming the max is above 64 that is. Has anyone tried this? Cheers, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of