Perlscript asp object syntax problem

Discussion in 'Perl Misc' started by Les, Nov 15, 2007.

  1. Les

    Les Guest

    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
    Les, Nov 15, 2007
    #1
    1. Advertising

  2. Les

    Mumia W. Guest

    On 11/15/2007 08:11 AM, Les wrote:
    > 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");
    Mumia W., Nov 15, 2007
    #2
    1. Advertising

  3. Les

    Les Guest

    On 15 Nov, 15:57, "Mumia W." <paduille.4061.mumia.w
    > wrote:
    > On 11/15/2007 08:11 AM, Les wrote:
    >
    >
    >
    >
    >
    > > 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");- 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.
    Les, Nov 16, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KaXo

    Using PerlScript In ASP

    KaXo, Mar 1, 2004, in forum: Perl
    Replies:
    2
    Views:
    585
  2. Replies:
    3
    Views:
    159
    Bob Barrows [MVP]
    Jan 25, 2006
  3. Brian

    Need help with PerlScript (asp).

    Brian, Jul 14, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    132
    ChrisO
    Jul 17, 2004
  4. LinnAxis
    Replies:
    9
    Views:
    133
    Tad McClellan
    Jan 27, 2005
  5. Replies:
    6
    Views:
    181
    Matt Garrish
    Jan 26, 2006
Loading...

Share This Page