Re: Win32::OLE::Variant, perl crashing.

2006-05-06 Thread Luke Bakken
if (ref ($sentdate) eq 'Win32::OLE::Variant') { # something with $sentdate-Date } else { # assume $sentdate is a string. } Best practice is to use UNIVERSAL::isa() : if (UNIVERSAL::isa($sentdate, 'Win32::OLE::Variant')) { } else { } Tested with: perl -MWin32::OLE::Variant

Re: Easy One

2006-05-02 Thread Luke Bakken
I have a string, $a for arguments sake, that contains a single word. The word will always have exactly 8 characters in it, most likely something like ABCD1234. I need to split this up into two strings ($b snip if (length $string == 8) # might as well check eh? { $string =~

Re: Easy One

2006-05-02 Thread Luke Bakken
I have a string, $a for arguments sake, that contains a single word. The word will always have exactly 8 characters in it, most likely something like ABCD1234. I need to split this up into two strings ($b snip if (length $string == 8) # might as well check eh? { $string =~

Re: Easy One

2006-05-02 Thread Luke Bakken
Maybe you're used to some old behavior in Perl, but that doesn't appear to be the case in 5.8.8 at least. I get this output: snip: output that proves me wrong Ah. Okay, I see why that worked now. $1, $2 et al are scoped to the current block, so in this case you are right. If you were to do

Re: Tk beep on Win2K?

2006-05-01 Thread Luke Bakken
The normal beep that you get when you do ^G is from the speaker inside the case of your PC. With a rackmount, you may be getting a beep, but not be able to hear it since it's coming from the case in the rack (if it even has a speaker). Apparently what you need to do is get the PC or

Re: Tk beep on Win2K?

2006-05-01 Thread Luke Bakken
Interestingly, MessageBeep() doesn't work on my XP machine but Beep() does. use strict; use Win32::API; my $msgBeep = Win32::API-new('user32', 'MessageBeep', 'N', 'N') or die Can't create a beep function: $^E\n; my $beep= Win32::API-new('kernel32', 'Beep', 'NN', 'N') or die Can't create a

Re: Easy One

2006-05-01 Thread Luke Bakken
On 5/1/06, Ng, Bill [EMAIL PROTECTED] wrote: Real simple, I have a string, $a for arguments sake, that contains a single word. The word will always have exactly 8 characters in it, most likely something like ABCD1234. I need to split this up into two strings ($b $c), the first string

Re: Tk beep on Win2K?

2006-05-01 Thread Luke Bakken
The normal beep that you get when you do ^G is from the speaker inside the case of your PC. With a rackmount, you may be getting a beep, but not be able to hear it since it's coming from the case in the rack (if it even has a speaker). Apparently what you need to do is get the PC or

Re: Perl bug?

2006-02-08 Thread Luke Bakken
This should illustrate what is going on: use strict; my $lTokens = [qw(2 * 2)]; print 1 before parse: , $lTokens, \n; my $errmsg = parse($lTokens); print($errmsg ? ERROR: $errmsg\n : OK\n); $lTokens = [qw(2 * 2)]; print 2 before parse: , $lTokens, \n; my $errmsg = parse($lTokens); print($errmsg

Re: remote ODBC problem

2006-01-09 Thread Luke Bakken
Your program must have access to the Access DB files themselves for the ODBC connection to work, that is why your process works if the DB is on the server itself. You'll have to make the files available via some sort of file-sharing - NFS or Windows file sharing. On 1/9/06, Hsu, David [EMAIL

Re: excel mods from perl

2006-01-03 Thread Luke Bakken
I would like to make some modifications to excel workbooks with perl scripts. I remember some discussion of similar topics but can not find the references. I will check the various modules on CPAN but would like a recommendation as to what module might be the best to experiment with so I

Re: Detecting memory leaks in perl scripts

2005-11-25 Thread Luke Bakken
Is there a known tool(preferably free/open source) to identify memory leaks in perl scripts ? Unless you are creating circular references you shouldn't have to worry about this. Do you have example code that you think is leaking memory? Luke ___

Re: connect to GoldMine DLL?

2005-11-15 Thread Luke Bakken
On 11/15/05, Paul Rogers [EMAIL PROTECTED] wrote: Has anyone here done any work connecting to GoldMine's API DLL (gm6s32.dll) via perl? While I've been able to connect to GoldMine from their COM DLL (essentially a wrapper around their core DLL), they are dropping support for this method and

Re: escaping characters

2005-10-11 Thread Luke Bakken
Hi all, I'm having trouble formatting a SQL statement. Here's what I have: $SQL = ... ((Measurements.msmTag)=\'tag\') AND(Targets.TargetID)=187) ...; When I do a screen print I get: ... ((Measurements.msmTag)='') ... If I escape the $SQL = ...