Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Boolean??

by cog (Parson)
on Apr 11, 2005 at 14:36 UTC ( [id://446620]=note: print w/replies, xml ) Need Help??

in reply to Boolean??

Judging from the documentation on Win32::Ole:

The LastError() class method returns the last recorded OLE error.


The last OLE error is automatically reset by a successful OLE call.

I'd say that LastError returns a true value if there was an error. If that is true, you can write:

if (Win32::OLE->LastError()) { print "Virtual directory was not created ($!).\n"; } else { print "Virtual directory created successfully.\n"; }

I might be wrong, because I've never used Win32::Ole, but if I am, I'm sure somebody will correct me.

Replies are listed 'Best First'.
Re^2: Boolean??
by mbayer (Novice) on Apr 11, 2005 at 16:16 UTC
    That did it, thank you very much. Perl is very generous off the bat with alot of functionality that you would have to build/call like with Java/C/C++... Thanks.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://446620]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-21 02:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found