I have written a large number of scripts using OLE and
Excel, but I'm getting something strange now.
Here are the relevant portions of the script:
$Excel = Win32::OLE-
GetActiveObject('Excel.Application') or Win32::OLE-
new('Excel.Application', 'Quit'); # This is one line
Two possibilities I would check. First, you forgot to check whether the
Excel object was properly created. Second, 'or' has a lower precedence than
assignment, so
$Excel = Win32::OLE-GetActiveObject('Excel.Application') or
Win32::OLE-new('Excel.Application', 'Quit');
is equivelant to
Doh! I knew it would be something easy. I had typed
'or' so it was more readable. Something clicked in my
head about precedence, but I ignored it.
Many thanks!
p.s. My script is running with strict and -w, it's
just that $Excel is in a 'my' statement before the
line I posted.
--- [EMAIL
On Fri, 11 Jan 2002, Jeffrey wrote:
I have written a large number of scripts using OLE and
Excel, but I'm getting something strange now.
Here are the relevant portions of the script:
$Excel = Win32::OLE-
GetActiveObject('Excel.Application') or Win32::OLE-
new('Excel.Application', 'Quit');
I'd like to see if some C code will speed some routines up. Is
perlxstut the place to start?
I guess I need to use MS VC, or compile Perl with Mingw32 first if I
want to use Mingw32?
Btw, can I compile extensions with MS VC 5.0 although the latest
ActivePerl is compiled with, afaik, 6.0?
- Original Message -
From: Marcus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 12, 2002 11:11 AM
Subject: C with Perl basics
I'd like to see if some C code will speed some routines up. Is
perlxstut the place to start?
I would start with the 'Inline' module. It
I finally figured out.
I have had Mastering Regular Expression for years but could never get very
far. Since, I finally figured out I was looking for extended ascii
characters.
On page 296, I found the expression $NonASCII= '\x80-\xff'. When I
orginally
started looking for a way to detect