In addition to the modules listed previously, Perl for Win32 can use an additional set of functions from the Win32 extension. These functions provide useful tools for some Windows-specific tasks that don't require their own modules. They are exported from the Win32 package with:
use Win32;
Many of these functions do not take arguments and return the value (or values) of the requested information, unless otherwise noted.
0 = OK 1 = OK and Cancel 2 = Abort, Retry, and Ignore 3 = Yes, No and Cancel 4 = Yes and No 5 = Retry and Cancel MB_ICONSTOP creates an "X" in a red circle MB_ICONQUESTION creates a question mark in a bubble MB_ICONEXCLAMATION creates an exclamation mark in a yellow triangle MB_ICONINFORMATION creates an "i" in a bubble
MsgBox( ) returns the menu ID of the selected pushbutton:
0 Error 1 OK 2 Cancel 3 Abort 4 Retry 5 Ignore 6 Yes 7 No
use Win32; ($string, $major, $minor, $build, $id) = Win32::GetOSVersion( );
Copyright © 2002 O'Reilly & Associates. All rights reserved.