Perlscript asp object syntax problem

L

Les

I am using a

$obj = $Server->CreateObject("customdll.object") command successfully.

I get the correct output from a call such as

$obj->{something};

but I can't get the correct syntax for a method which in vbscript
works fine as

objAuth.OutputField("message")

When I use my best guess

$strMessage = "$obj->{OutputField}->{'message'}";

$Response->Write("message is: $strMessage ." );

there is no error but the output is just "message is:."

though I am sure there would be a message.

At the head of the page I have

use Data::Dumper;
use Win32::OLE;
use Win32::OLE::Variant; #this gets the dates out of the database
right.
use Time::Local;

and tried

for my $item ($obj){
$Response->Write("Got first, " . Dumper($item) . "<br>");
}

but the output of that is

Got first, $VAR1 = bless( {}, 'Win32::OLE' );

It would be much appreciated if I could be told the correct syntax.
Les
 
M

Mumia W.

I am using a

$obj = $Server->CreateObject("customdll.object") command successfully.

I get the correct output from a call such as

$obj->{something};

but I can't get the correct syntax for a method which in vbscript
works fine as

objAuth.OutputField("message")

When I use my best guess

$strMessage = "$obj->{OutputField}->{'message'}";

$Response->Write("message is: $strMessage ." );

there is no error but the output is just "message is:."

though I am sure there would be a message.
[...]

I have no access to a Windows/IIS/ASP/Perl system for testing, but my
guess is that you have to do this:

$strMessage = $obj->OutputField("message");
 
L

Les

I am using a
$obj = $Server->CreateObject("customdll.object") command successfully.
I get the correct output from a call such as

but I can't get the correct syntax for a method which in vbscript
works fine as

When I use my best guess
$strMessage = "$obj->{OutputField}->{'message'}";
$Response->Write("message is: $strMessage ." );
there is no error but the output is just "message is:."
though I am sure there would be a message.
[...]

I have no access to a Windows/IIS/ASP/Perl system for testing, but my
guess is that you have to do this:

$strMessage = $obj->OutputField("message");- Hide quoted text -

- Show quoted text -

Dear Mumia,

You are so right. I thought I had tried that, but it seems not, and it
works nicely. Thank you so much.
 

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,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top