![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re: Re: Dots and cargo-cult programmingby rchiav (Deacon) |
on Jul 16, 2001 at 03:05 UTC ( #96914=note: print w/replies, xml ) | Need Help?? |
That understanding will help you, but there will be other differences. For instance, this.that = 2 in VB would be $this->{that} = 2 in Perl. But something like a method call would be this->DoSomething.
Using Win32::OLE isn't as straightforward as you might want it to be. The biggest things to look out for is that when you're setting properties, you're going to be using a hash, and there are other times when you're going to be using lists. For example.. This is some DB code that uses ADO..
and someting similar in VB (sorry, this below is from some ASP a customer asked me to put together. Above is something I use. They don't perform the same task, but you should be able to see what mirrors what. and what was a little confusing to figure out is that in VB, You can refrence the "Name0" field as objRecordset("Name0") but in Perl it's $objRecordset->{'Name0'}{'Value'} I personally prefer Perl, but with things like Win32::OLE it's a lot of poke and hope to figure out just how you have to access properties and methods.
In Section
Meditations
|
|