Perl ActiveX: A VBA string passed to my control is treated as a doubel-quoted string

  • Thread starter david.f.jenkins
  • Start date
D

david.f.jenkins

Hi: I'm very new at all things Perl, so I may have my terminology
boogered up. Here goes:

I have written a Perl ActiveX control that's suppose to do some regular
expression operations on data and patterns sent from VBA (as VT_BSTR).
Everything seems to be working ok, except that it appears the pattern
arguments to Perl are being treated as double-quoted strings.

Here is a string I'm passing in from VBA (and also using when testing
using a Perl call):

"(\s)(-{1,2}|-)(\s)" (the character after the vertical bar is an en
dash.)

When I use this string in VBA, I get erroneous resutls from my control.
If I write a call in Perl, using the same arguments as I use in VBA, I
also get erroneous results. However, if I change the Perl argument
string to a single-quoted string, then I get correct results. Alos, if
I change the \s's to blanks and use double quotes, it works ok. If I
leave the \s's in and use single-quotes, it works ok. But as is -
unh-unh.

Do I have interpolative context problems? The larger question I have,
is how can I coerce the control to treat the string that's being passed
in as single-quoted string? Or is there perhaps some easier solution?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top