RatArsed has asked for the wisdom of the Perl Monks concerning the following question:
I've got the fun task of converting some ASP to Perl, pretty trivial except for the case where I get something like this (JScript):
var rsFollow = Server.CreateObject('ADODB.Recordset'); /* snip */ while (!rsFollow.EOF) { Response.Write(' <tr>\n'); Response.Write(' <td>' + rsFollow("Book Title") + '</td>\n' +); rsFollow.MoveNext(); }
Now, most of this can be ported relatively easily, so that you get something like:
This however doesn't work, spewing out a bunch of errors ("Win32::OLE=HASH(0x1a71c20)" etc)my $rsFollow = Win32::OLE->new('ADODB.Recordset'); # snip while( !$rsFollow->{EOF} ) { print( " <tr>\n" ); print( " <td> $rsFollow->{'Book Title'} + </td>\n"); print( " </tr>\n" ); $rsFollow->MoveNext(); }
But it seems Perl doesn't want to iterate through the collections until it matches?
PS: I'm using strict and warnings, and this isn't going to stay as spewing out HTML...
--
RatArsed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using COM in Perl
by t0mas (Priest) on Aug 14, 2001 at 14:56 UTC | |
by RatArsed (Monk) on Aug 14, 2001 at 15:56 UTC |