Thanks Luke, SUPER. That's the one I was thinking about. Much better than nesting every last single call to Date() in an ungainly if/else statement.
> ----- Original Message ----- > From: "Luke Bakken" <[EMAIL PROTECTED]> > To: perl-win32-users@listserv.ActiveState.com > Subject: Re: Win32::OLE::Variant, perl crashing. > Date: Sat, 6 May 2006 14:34:35 -0700 > > > > if (ref ($sentdate) eq 'Win32::OLE::Variant') { > > # something with $sentdate->Date > > } else { > > # assume $sentdate is a string. > > } > > Best practice is to use UNIVERSAL::isa() : > > if (UNIVERSAL::isa($sentdate, 'Win32::OLE::Variant')) { > } > else { > } > > Tested with: > > perl -MWin32::OLE::Variant -e"$v=Win32::OLE::Variant->new();print > qq(YESSIR) if UNIVERSAL::isa($v, q(Win32::OLE::Variant))" > > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > -- _______________________________________________ Search for businesses by name, location, or phone number. -Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs