home *** CD-ROM | disk | FTP | other *** search
/ Chip: Windows 2000 Professional Resource Kit / W2KPRK.iso / apps / perl / ActivePerl.exe / data.z / perlwin32faq9.html < prev    next >
Encoding:
Extensible Markup Language  |  1999-10-15  |  29.2 KB  |  859 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3.     "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
  4. <html xmlns="http://www.w3.org/TR/xhtml1">
  5.   <head>
  6.     <title>perlwin32faq9 - Modules and sample scripts</title>
  7.     <link rev="made" href="mailto:bjepson@debian.ids.net" />
  8.     <meta name="GENERATOR" charset="iso-8859-1" />
  9.     <link rel="STYLESHEET" href="../win32prk.css" type="text/css"
  10.     media="screen" />
  11.   </head>
  12.  
  13.   <body bgcolor="#ffffff">
  14.     <!-- beginning of leaf header-->
  15.  
  16.     <table width="100%">
  17.       <tr>
  18.         <td bgcolor="000000" width="70" height="31"><a href= 
  19.         "http://www.activestate.com/"><img src="ASbutton.gif" alt= 
  20.         "ActiveState Home Page" border="0" width="68" height=
  21.         "30" /></a></td>
  22.  
  23.         <td width="10" bgcolor="#ffffff"> </td>
  24.  
  25.         <td valign="middle" bgcolor="#cc0066"><font face=
  26.         "sans-serif" size="+1" color="#ff99cc">   
  27.         Win32 FAQ</font></td>
  28.       </tr>
  29.     </table>
  30.     <!-- end of leaf content--><!-- INDEX BEGIN -->
  31.  
  32.     <ul>
  33.       <li><a href="#NAME">NAME</a></li>
  34.  
  35.       <li>
  36.         <a href="#DESCRIPTION">DESCRIPTION</a> 
  37.  
  38.         <ul>
  39.           <li><a href="#How_can_I_use_modules_from_CPAN_">How can I
  40.           use modules from CPAN?</a></li>
  41.  
  42.           <li><a href="#Where_do_I_get_a_Win32_make">Where do I get
  43.           make for Win32?</a></li>
  44.  
  45.           <li><a href="#How_do_I_access_databases_from_m">How do I
  46.           access databases from my Perl script?</a></li>
  47.  
  48.           <li><a href="#Is_there_a_way_to_use_OLE_Automa">Is there
  49.           a way to use OLE Automation servers from my Perl
  50.           script?</a></li>
  51.  
  52.           <li><a href="#Is_there_a_way_to_access_Data_Ac">Is there
  53.           a way to access Data Access Objects (DAO) from my
  54.           Perl</a></li>
  55.  
  56.           <li><a href="#Can_I_send_Internet_mail_from_Pe">Can I
  57.           send Internet mail from Perl for Win32?</a></li>
  58.  
  59.           <li><a href="#Is_there_a_way_to_access_MAPI_fr">Is there
  60.           a way to access MAPI from my Perl script?</a></li>
  61.  
  62.           <li><a href="#Is_there_a_DBM_implementation_av">Is there
  63.           a DBM implementation available for Perl for
  64.           Win32?</a></li>
  65.  
  66.           <li><a href="#Is_there_a_GDBM_available_for_Pe">Is there
  67.           a GDBM available for Perl for Win32?</a></li>
  68.  
  69.           <li><a href="#Is_there_a_way_to_do_GUI_program">Is there
  70.           a way to do GUI programming with Perl for Win32?</a></li>
  71.  
  72.           <li><a href="#Is_there_a_port_of_Oraperl_for_W">Is there
  73.           a port of Oraperl for Win32?</a></li>
  74.  
  75.           <li><a href="#What_modules_come_with_the_Perl_">What
  76.           modules come with the Perl for Win32
  77.           distribution?</a></li>
  78.  
  79.           <li><a href="#Where_can_I_find_other_modules_f">Where can
  80.           I find other modules for Perl for Win32?</a></li>
  81.  
  82.           <li><a href="#Is_there_a_GD_module_available_f">Is there
  83.           a GD module available for Perl for Win32?</a></li>
  84.  
  85.           <li><a href="#What_is_CPAN_and_how_do_I_use_it">What is
  86.           CPAN and how do I use it?</a></li>
  87.  
  88.           <li><a href="#Is_there_a_library_to_read_or_wr">Is there
  89.           a library to read or write Microsoft Office or
  90.           other</a></li>
  91.         </ul>
  92.       </li>
  93.  
  94.       <li><a href="#AUTHOR_AND_COPYRIGHT">AUTHOR AND
  95.       COPYRIGHT</a></li>
  96.     </ul>
  97.     <!-- INDEX END -->
  98.     <hr />
  99.     <br />
  100.  
  101.     <h1><a name="NAME">NAME</a></h1>
  102.  
  103.     <p>perlwin32faq9 - Modules and sample scripts</p>
  104.     <br />
  105.     <hr />
  106.  
  107.     <h1><a name="DESCRIPTION">DESCRIPTION</a></h1>
  108.     <br />
  109.     <hr />
  110.  
  111.     <h2><a name="How_can_I_use_modules_from_CPAN_">How can I use
  112.     modules from CPAN?</a></h2>
  113.  
  114.     <p>As of version 5.005, Perl for Win32 supports the MakeMaker
  115.     utility. This allows you to install modules from <font size=
  116.     "-1">CPAN,</font> but requires you to have a make utility, such
  117.     as nmake or dmake. Modules are generally distributed in gzipped
  118.     tar files, such as <em>Data-Dumper-2.08.tar.gz</em>.</p>
  119.  
  120.     <p>However, Perl for Win32 includes the Perl Package Manager
  121.     <font size="-1">(PPM),</font> a utility that allows you to
  122.     install modules, including modules that contain binary
  123.     extensions. You should consider using <font size="-1">
  124.     PPM</font> to install a module, as this greatly simplifies the
  125.     management of modules.</p>
  126.  
  127.     <p>Nevertheless, there are times when it is necessary to build
  128.     a module from source. Typically, an installation session goes
  129.     something like this:</p>
  130.  
  131.     <ol>
  132.       <li>
  133.         <strong><a name="item_"></a></strong> 
  134.  
  135.         <p>Extract the module. This creates a directory based on
  136.         the name of the archive.</p>
  137.         <br />
  138. <pre>
  139.     gzip -d -c Data-Dumper-2.08.tar.gz | tar xvf -
  140. </pre>
  141.       </li>
  142.  
  143.       <li>
  144.          
  145.  
  146.         <p>Change directory to the module's directory.</p>
  147.         <br />
  148. <pre>
  149.     cd Data-Dumper-2.08
  150. </pre>
  151.       </li>
  152.  
  153.       <li>
  154.          
  155.  
  156.         <p>Consult the <font size="-1">README</font> file.</p>
  157.         <br />
  158. <pre>
  159.     more < README
  160. </pre>
  161.       </li>
  162.  
  163.       <li>
  164.          
  165.  
  166.         <p>Run the <em>Makefile.PL</em> script. This uses the
  167.         MakeMaker module to build a makefile you can build the
  168.         extension with.</p>
  169.         <br />
  170. <pre>
  171.     perl Makefile.PL
  172. </pre>
  173.       </li>
  174.  
  175.       <li>
  176.          
  177.  
  178.         <p>Run your make utility. This prepares the module for
  179.         installation, and compiles any extension if one is
  180.         present.</p>
  181.         <br />
  182. <pre>
  183.     nmake
  184. </pre>
  185.       </li>
  186.  
  187.       <li>
  188.          
  189.  
  190.         <p>If this module has tests, run them.</p>
  191.         <br />
  192. <pre>
  193.     nmake test
  194. </pre>
  195.       </li>
  196.  
  197.       <li>
  198.          
  199.  
  200.         <p>If the tests succeeded, install the module.</p>
  201.         <br />
  202. <pre>
  203.     nmake install
  204. </pre>
  205.       </li>
  206.     </ol>
  207.  
  208.     <p>See <a href= 
  209.     "perlwin32faq4.html#Where_can_I_find_Win32_ports_of_">Where can
  210.     I find Win32 ports of UNIX tools?</a> for information on the
  211.     availability of tools like gzip and tar.</p>
  212.     <br />
  213.     <hr />
  214.  
  215.     <h2><a name="Where_do_I_get_a_Win32_make">Where do I get make
  216.     for Win32?</a></h2>
  217.  
  218.     <dl>
  219.       <dt><strong><a name="item_nmake">nmake</a></strong></dt>
  220.  
  221.       <dd>
  222.         <p>nmake is a 'make' like program for Win32 systems by
  223.         Microsoft. It is available from <a href= 
  224.         "ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe">
  225.         ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe</a></p>
  226.         <br />
  227.       </dd>
  228.     </dl>
  229.     <hr />
  230.  
  231.     <h2><a name="How_do_I_access_databases_from_m">How do I access
  232.     databases from my Perl script?</a></h2>
  233.  
  234.     <dl>
  235.       <dt><strong><a name="item_ADO">ADO</a></strong></dt>
  236.  
  237.       <dd>
  238.         <p>The ActiveX Data Objects <font size="-1">(ADO)</font>
  239.         <font size="-1">API</font> can be used with the Win32::OLE
  240.         module. You can use <font size="-1">ADO</font> to access
  241.         any <font size="-1">ODBC</font> data source. The
  242.         Perl-Win32-Database <font size="-1">FAQ</font> includes
  243.         some information on <font size="-1">ADO:</font></p>
  244.         <br />
  245. <pre>
  246.     <a href= 
  247. "http://www.fastnetltd.ndirect.co.uk/Perl/perl-win32-database.html">http://www.fastnetltd.ndirect.co.uk/Perl/perl-win32-database.html</a>
  248. </pre>
  249.  
  250.         <p>The <font size="-1">ADO</font> home page is located
  251.         at:</p>
  252.         <br />
  253. <pre>
  254.     <a href=
  255. "http://www.microsoft.com/data/ado/">http://www.microsoft.com/data/ado/</a>
  256. </pre>
  257.       </dd>
  258.  
  259.       <dt><strong><a name="item_Win32">
  260.       Win32::ODBC</a></strong></dt>
  261.  
  262.       <dd>
  263.         <p>There are a couple of extensions that have been
  264.         developed to access databases from Perl for Win32.
  265.         Win32::ODBC is widely popular, and is available on <font
  266.         size="-1">CPAN</font> and at this <font size="-1">
  267.         URL:</font></p>
  268.         <br />
  269. <pre>
  270.     <a href=
  271. "http://www.roth.net/odbc/">http://www.roth.net/odbc/</a> 
  272. </pre>
  273.       </dd>
  274.  
  275.       <dt><strong><a name="item_DBI">DBI</a></strong></dt>
  276.  
  277.       <dd>
  278.         <p> <font size="-1">DBI,</font> a Database Interface Module
  279.         for Perl provides a consistent interface for database
  280.         application development. <font size="-1">DBI</font>
  281.         supports <font size="-1">ODBC</font> drivers as well as the
  282.         native APIs of certain databases, including Oracle. The
  283.         <font size="-1">DBI</font> home page is located at:</p>
  284.         <br />
  285. <pre>
  286.     <a href= 
  287. "http://www.hermetica.com/technologia/perl/DBI/index.html">http://www.hermetica.com/technologia/perl/DBI/index.html</a>
  288. </pre>
  289.       </dd>
  290.  
  291.       <dt><strong><a name="item_Sybase">Sybase</a></strong></dt>
  292.  
  293.       <dd>
  294.         <p>The Sybperl module allows you to connect to Sybase <font
  295.         size="-1">SQL</font> Server (and possibly Microsoft <font
  296.         size="-1">SQL</font> Server). The Sybperl home page, which
  297.         includes links to binary releases of Sybperl, is located
  298.         at:</p>
  299.         <br />
  300. <pre>
  301.     <a href=
  302. "http://www.mbay.net/~mpeppler/">http://www.mbay.net/~mpeppler/</a>
  303. </pre>
  304.       </dd>
  305.     </dl>
  306.  
  307.     <p>If you choose to use a database <font size="-1">API</font>
  308.     that depends on <font size="-1">ODBC,</font> you must have an
  309.     <font size="-1">ODBC</font> driver for the <font size="-1">
  310.     DBMS</font> you're using. You will need to configure a data
  311.     source for that driver on each machine that needs to access the
  312.     database. For more information on <font size="-1">ODBC</font>
  313.     and how to configure a data source, check the <font size="-1">
  314.     ODBC</font> Control Panel help.</p>
  315.  
  316.     <p>Some DBMSs, such as Microsoft Access and Microsoft <font
  317.     size="-1">SQL</font> Server, can be controlled through <font
  318.     size="-1">OLE</font> Automation (see the next question). See
  319.     the product documentation for details.</p>
  320.     <br />
  321.     <hr />
  322.  
  323.     <h2><a name="Is_there_a_way_to_use_OLE_Automa">Is there a way
  324.     to use OLE Automation servers from my Perl script?</a></h2>
  325.  
  326.     <p>Yes. See the documentation for the Win32::OLE module, which
  327.     is included with Perl. You can use Win32::OLE to control a wide
  328.     range of Win32 applications and APIs, including <font size=
  329.     "-1">ADO.</font></p>
  330.  
  331.     <p>After reading the documentation, you can read the <a href= 
  332.     "perlwin32faq12.html">FAQ on using OLE</a>.</p>
  333.     <br />
  334.     <hr />
  335.  
  336.     <h2><a name="Is_there_a_way_to_access_Data_Ac">Is there a way
  337.     to access Data Access Objects (DAO) from my Perl
  338.     script?</a></h2>
  339.  
  340.     <p>You should use Win32::OLE to access this <font size="-1">
  341.     API.</font> See question <a href= 
  342.     "#Is_there_a_way_to_use_OLE_Automa">Is there a way to use OLE
  343.     Automation servers from my Perl script?</a> and consult the
  344.     <font size="-1">DAO</font> documentation.</p>
  345.     <br />
  346.     <hr />
  347.  
  348.     <h2><a name="Can_I_send_Internet_mail_from_Pe">Can I send
  349.     Internet mail from Perl for Win32?</a></h2>
  350.  
  351.     <p>If you need to send Internet mail, you should use Net::SMTP,
  352.     Mail::Sender, or Mail::Sendmail. For more information on these
  353.     modules, see <a href= 
  354.     "perlwin32faq4.html#How_do_I_send_email_from_Perl_fo">How do I
  355.     send email from Perl for Win32?</a>.</p>
  356.     <br />
  357.     <hr />
  358.  
  359.     <h2><a name="Is_there_a_way_to_access_MAPI_fr">Is there a way
  360.     to access MAPI from my Perl script?</a></h2>
  361.  
  362.     <p>You can use the Win32::OLE module to create an instance of a
  363.     <font size="-1">MAPI</font> session and send a message. In
  364.     order for this to work, you must have messaging configured
  365.     correctly on your machine. If you can are using Microsoft
  366.     Exchange, chances are this will work fine.</p>
  367.  
  368.     <p>If you need to send Internet mail, you should use Net::SMTP.
  369.     For more information on Net::SMTP, see <a href= 
  370.     "perlwin32faq4.html#How_do_I_send_email_from_Perl_fo">How do I
  371.     send email from Perl for Win32?</a>. Here is an example script
  372.     that sends mail using <font size="-1">MAPI:</font></p>
  373.     <br />
  374. <pre>
  375.     # Sender's Name and Password
  376.     #
  377.     my $sender = "YOUR NAME HERE";
  378.     my $passwd = "YOUR PASSWORD HERE";
  379.     
  380.     use Win32::OLE;
  381.  
  382.     # MAPI.Session needs the specialized COINIT_OLEINITIALIZE flag.
  383.     # (Most other components do not need it, see the OLE
  384.     # documentation for more about this.)
  385.     #
  386.     Win32::OLE->Initialize(Win32::OLE::COINIT_OLEINITIALIZE);
  387.  
  388.     # Create a new MAPI Session
  389.     #
  390.     $session = Win32::OLE->new("MAPI.Session")
  391.         or die "Could not create a new MAPI Session: $!";
  392.     
  393.     # Attempt to log on.
  394.     #
  395.     my $err = $session->Logon($sender, $passwd);
  396.     if ($err) {
  397.         die "Logon failed: $!";
  398.     }
  399.     
  400.     # Add a new message to the Outbox.
  401.     #
  402.     $msg = $session->Outbox->Messages->Add();
  403.     
  404.     # Add the recipient.
  405.     #
  406.     $rcpt = $msg->Recipients->Add();
  407.     $rcpt->{Name} = "RECIPIENT NAME HERE";
  408.     $rcpt->Resolve();
  409.     
  410.     # Create a subject and a body.
  411.     #
  412.     $msg->{Subject} = "Test Message";
  413.     $msg->{Text} = <<EOF;
  414.     This is a sample test message.
  415.     
  416.     Cheers,
  417.     
  418.     Mr. Email
  419.     
  420.     EOF
  421.     
  422.     # Send the message and log off.
  423.     #
  424.     $msg->Update();
  425.     $msg->Send(0, 0, 0);
  426.     $session->Logoff();
  427. </pre>
  428.     <br />
  429.     <hr />
  430.  
  431.     <h2><a name="Is_there_a_DBM_implementation_av">Is there a DBM
  432.     implementation available for Perl for Win32?</a></h2>
  433.  
  434.     <p>Yes, there is. SDBM_File is a free clone of <font size="-1">
  435.     DBM,</font> and is implemented and distributed with the Perl
  436.     for Win32 distribution. You can use it as follows:</p>
  437.     <br />
  438. <pre>
  439.     use SDBM_File;
  440.     use Fcntl; 
  441.     
  442.     tie( %myhash, "SDBM_File", 'myfile', O_RDWR | O_CREAT | O_BINARY, 0666 )
  443.         or die( "Can't tie: $!" );
  444.     
  445.     $myhash{"bibim"} = "bap";
  446.     
  447.     untie( %myhash );
  448. </pre>
  449.  
  450.     <p>After the <font size="-1">DBM</font> file is tied, you can
  451.     use it just like any other hash.</p>
  452.     <br />
  453.     <hr />
  454.  
  455.     <h2><a name="Is_there_a_GDBM_available_for_Pe">Is there a GDBM
  456.     available for Perl for Win32?</a></h2>
  457.  
  458.     <p> <font size="-1">GDBM,</font> <font size="-1">NDBM,</font>
  459.     and <font size="-1">ODBM</font> do not build on Win32.</p>
  460.     <br />
  461.     <hr />
  462.  
  463.     <h2><a name="Is_there_a_way_to_do_GUI_program">Is there a way
  464.     to do GUI programming with Perl for Win32?</a></h2>
  465.  
  466.     <p>As of the Perl Resource Kit for Win32, the Tk library has
  467.     been successfully ported to Perl for Win32. Tk version 8xx and
  468.     above also now has the look and feel of Windows programs, and
  469.     not the old <font size="-1">UNIX</font> look of previous
  470.     versions.</p>
  471.  
  472.     <p>You can also use the Win32::GUI module which also allows for
  473.     GUI's to be made/manipulated using Perl. This module uses the
  474.     standard Windows widgets to give the look and feel of Windows
  475.     programs.</p>
  476.  
  477.     <p>For Tk information, go to <a href= 
  478.     "http://w4.lns.cornell.edu/~pvhp/ptk/ptkTOC.html">
  479.     http://w4.lns.cornell.edu/~pvhp/ptk/ptkTOC.html</a></p>
  480.  
  481.     <p>For Win32::GUI, go to <a href= 
  482.     "http://www.divinf.it/dada/perl/gui/">
  483.     http://www.divinf.it/dada/perl/gui/</a>.</p>
  484.  
  485.     <p><code>Win32::MsgBox</code> allows for a fast and easy way to
  486.     display a Windows message box, for example:</p>
  487.  
  488.     <blockquote>
  489.       <p><code>use Win32;<br />
  490.       <br />
  491.       MsgBox("Test", "This is a test", 48);<br />
  492.       # display a message box with an exclamation mark and an 'Ok'
  493.       button<br />
  494.       <br />
  495.       sub MsgBox {<br />
  496.           my ($caption, $message,
  497.       $icon_buttons) = @_;<br />
  498.           my @return = qw/- Ok Cancel Abort
  499.       Retry Ignore Yes No/;<br />
  500.           my $result = Win32::MsgBox($message,
  501.       $icon_buttons, $caption);<br />
  502.           return $return[$result];<br />
  503.       }</code></p>
  504.     </blockquote>
  505.  
  506.     <p>The last value, $icon_buttons, is the sum of two values, the
  507.     value for the icon and the value for the buttons. For example,
  508.     if you need a message box with a question mark and the 'Ok' and
  509.     'Cancel' buttons the value you want is 32 (question mark) + 1
  510.     (Ok, Cancel) = 39. The values are listed here:</p>
  511.  
  512.     <blockquote>
  513.       <p><code>Icons:<br />
  514.          0 - no icon<br />
  515.         16 - Hand<br />
  516.         32 - Question<br />
  517.         48 - Exclamation<br />
  518.         64 - Asterisk<br />
  519.       <br />
  520.       Buttons:<br />
  521.          0 - Ok<br />
  522.          1 - Ok, Cancel<br />
  523.          2 - Abort, Retry, Ignore<br />
  524.          3 - Yes, No, Cancel<br />
  525.          4 - Yes, No<br />
  526.          5 - Retry, Cancel</code></p>
  527.     </blockquote>
  528.     <br />
  529.     <hr />
  530.  
  531.     <h2><a name="Is_there_a_port_of_Oraperl_for_W">Is there a port
  532.     of Oraperl for Win32?</a></h2>
  533.  
  534.     <p>Oraperl is available as an emulation layer on top of
  535.     DBD::Oracle. Oraperl is included with the DBD::Oracle
  536.     distribution. Because the <font size="-1">DBI</font> interface
  537.     is evolving, the Oraperl emulation layer is recommended because
  538.     its <font size="-1">API</font> is fairly stable.</p>
  539.  
  540.     <p>Patches are available for DBD::Oracle that allow it to build
  541.     on Windows <font size="-1">NT.</font> More information is
  542.     available at:</p>
  543.     <br />
  544. <pre>
  545.    <a href= 
  546. "http://www.hermetica.com/technologia/perl/DBI/win32/index.html">http://www.hermetica.com/technologia/perl/DBI/win32/index.html</a>
  547. </pre>
  548.  
  549.     <p>Binary distributions of <font size="-1">DBI</font> and
  550.     DBD::Oracle are available from:</p>
  551.     <br />
  552. <pre>
  553.     <a href=
  554. "http://www.access.digex.net/~jurlwin/">http://www.access.digex.net/~jurlwin/</a>
  555. </pre>
  556.     <br />
  557.     <hr />
  558.  
  559.     <h2><a name="What_modules_come_with_the_Perl_">What modules
  560.     come with the Perl for Win32 distribution?</a></h2>
  561.  
  562.     <p>Along with the standard library files, there are several
  563.     Win32-specific modules that are distributed with Perl for
  564.     Win32. These include:</p>
  565.  
  566.     <ul>
  567.       <li><strong><a name="item_Win32">Win32::Clipboard: Perl
  568.       module for Windows clipboard interaction</a></strong></li>
  569.  
  570.       <li><strong><a name="item_Win32">Win32::Console: Perl module
  571.       for Windows console interaction</a></strong></li>
  572.  
  573.       <li><strong><a name="item_Win32">Win32::ChangeNotification:
  574.       Create and use ChangeNotification objects</a></strong></li>
  575.  
  576.       <li><strong><a name="item_Win32">Win32::Event: Use Win32
  577.       event objects from Perl</a></strong></li>
  578.  
  579.       <li><strong><a name="item_Win32">Win32::EventLog: Read from
  580.       and write to the Windows NT event log</a></strong></li>
  581.  
  582.       <li><strong><a name="item_Win32">Win32::File: Manage file
  583.       attributes (read only, system, hidden...)</a></strong></li>
  584.  
  585.       <li><strong><a name="item_Win32">Win32::FileSecurity: manage
  586.       ACLs in Perl</a></strong></li>
  587.  
  588.       <li><strong><a name="item_Win32">Win32::Internet: Perl module
  589.       for Internet extensions</a></strong></li>
  590.  
  591.       <li><strong><a name="item_Win32">Win32::IPC: Wait for objects
  592.       (processes, mutexes, semaphores)</a></strong></li>
  593.  
  594.       <li><strong><a name="item_Win32">Win32::Mutex: Create and use
  595.       mutexes</a></strong></li>
  596.  
  597.       <li><strong><a name="item_Win32">Win32::NetAdmin: Administer
  598.       users and groups</a></strong></li>
  599.  
  600.       <li><strong><a name="item_Win32">Win32::NetResource: Manage
  601.       resources (servers, file shares, printers)</a></strong></li>
  602.  
  603.       <li><strong><a name="item_Win32">Win32::ODBC: work with ODBC
  604.       data sources</a></strong></li>
  605.  
  606.       <li><strong><a name="item_Win32">Win32::OLE: Use OLE
  607.       automation from Perl</a></strong></li>
  608.  
  609.       <li><strong><a name="item_Win32">Win32::Pipe: Perl module for
  610.       pipes</a></strong></li>
  611.  
  612.       <li><strong><a name="item_Win32">Win32::Process: Start and
  613.       stop Win32 processes</a></strong></li>
  614.  
  615.       <li><strong><a name="item_Win32">Win32::Registry: Read and
  616.       manage the Win32 Registry</a></strong></li>
  617.  
  618.       <li><strong><a name="item_Win32">Win32::Semaphore: Create and
  619.       use semaphores</a></strong></li>
  620.  
  621.       <li><strong><a name="item_Win32">Win32::Service: Manage
  622.       Windows NT services</a></strong></li>
  623.  
  624.       <li><strong><a name="item_Win32">Win32::Shortcut: Perl module
  625.       for shell link interface</a></strong></li>
  626.  
  627.       <li><strong><a name="item_Win32">Win32::WinError: For
  628.       retrieving Win32-defined errors</a></strong></li>
  629.     </ul>
  630.  
  631.     <p>These are documented on the Win32mod documentation page.
  632.     There are also a number of subs built into the Win32 package,
  633.     namely:</p>
  634.  
  635.     <ul>
  636.       <li><strong><a name="item_AbortSystemShutdown">
  637.       AbortSystemShutdown: I mean, don't shut down this
  638.       computer</a></strong></li>
  639.  
  640.       <li><strong><a name="item_DomainName">DomainName: Name of the
  641.       domain this machine is in</a></strong></li>
  642.  
  643.       <li><strong><a name="item_ExpandEnvironmentStrings">
  644.       ExpandEnvironmentStrings: Take a string like %HOMEPATH% and
  645.       expand it to the actual value</a></strong></li>
  646.  
  647.       <li><strong><a name="item_FormatMessage">FormatMessage:
  648.       Format a Win32 error code into a error
  649.       message</a></strong></li>
  650.  
  651.       <li><strong><a name="item_FsType">FsType: Get the file system
  652.       type of a drive</a></strong></li>
  653.  
  654.       <li><strong><a name="item_GetCwd">GetCwd: Get current working
  655.       directory</a></strong></li>
  656.  
  657.       <li><strong><a name="item_GetLastError">GetLastError:
  658.       Retrieve the last Win32 error code.</a></strong></li>
  659.  
  660.       <li><strong><a name="item_GetNextAvailDrive">
  661.       GetNextAvailDrive: Returns the next available drive
  662.       letter</a></strong></li>
  663.  
  664.       <li><strong><a name="item_GetOSVersion">GetOSVersion: Get
  665.       Win32 operating system version</a></strong></li>
  666.  
  667.       <li><strong><a name="item_GetShortPathName">GetShortPathName:
  668.       Returns the 8.3 name of a filename</a></strong></li>
  669.  
  670.       <li><strong><a name="item_GetTickCount">GetTickCount: Time
  671.       since Windows started, in milliseconds (for
  672.       timing)</a></strong></li>
  673.  
  674.       <li><strong><a name="item_InitiateSystemShutdown">
  675.       InitiateSystemShutdown: Shut down this
  676.       computer</a></strong></li>
  677.  
  678.       <li><strong><a name="item_IsWinNT">IsWinNT: Is this Windows
  679.       NT?</a></strong></li>
  680.  
  681.       <li><strong><a name="item_IsWin95">IsWin95: Or, is it Windows
  682.       95?</a></strong></li>
  683.  
  684.       <li><strong><a name="item_LoginName">LoginName: Name of
  685.       logged-in user</a></strong></li>
  686.  
  687.       <li><strong><a name="item_LookupAccountName">
  688.       LookupAccountName: Given a user name, get domain, SID, SID
  689.       type</a></strong></li>
  690.  
  691.       <li><strong><a name="item_LookupAccountSID">LookupAccountSID:
  692.       Given a SID, get domain, user name, SID
  693.       type</a></strong></li>
  694.  
  695.       <li><strong><a name="item_NodeName">NodeName: Name of this
  696.       machine</a></strong></li>
  697.  
  698.       <li><strong><a name="item_SetCwd">SetCwd: Set current working
  699.       directory</a></strong></li>
  700.  
  701.       <li><strong><a name="item_Sleep">Sleep: Sleep for a given
  702.       number of milliseconds</a></strong></li>
  703.  
  704.       <li><strong><a name="item_Spawn">Spawn: Spawn a Win32
  705.       process</a></strong></li>
  706.  
  707.       <li><strong><a name="item_ExpandEnvironmentStrings">
  708.       ExpandEnvironmentStrings: Take a string like %HOMEPATH% and
  709.       expand it to the actual value</a></strong></li>
  710.     </ul>
  711.  
  712.     <p>No longer included in the Win32 module:</p>
  713.  
  714.     <ul>
  715.       <li><strong><a name="item_PerlVersion">PerlVersion: Use $]
  716.       instead</a></strong></li>
  717.  
  718.       <li><strong><a name="item_GetArchName">GetArchName: Use
  719.       $ENV{PROCESSOR_ARCHITECTURE}</a></strong></li>
  720.  
  721.       <li><strong><a name="item_GetChipName">GetChipName: Use
  722.       $ENV{PROCESSOR_LEVEL} .
  723.       $ENV{PROCESSOR_ARCHITECTURE}</a></strong></li>
  724.     </ul>
  725.     <br />
  726.     <hr />
  727.  
  728.     <h2><a name="Where_can_I_find_other_modules_f">Where can I find
  729.     other modules for Perl for Win32?</a></h2>
  730.  
  731.     <p>Modules for Perl for Win32 are available on <font size="-1">
  732.     CPAN</font> (Comprehensive Perl Archive Network), a Perl
  733.     archive that's mirrored around the world. To find your nearest
  734.     mirror, check here:</p>
  735.     <br />
  736. <pre>
  737.     <a href=
  738. "http://www.perl.com/perl/CPAN/modules/by-module/Win32/">http://www.perl.com/perl/CPAN/modules/by-module/Win32/</a>
  739. </pre>
  740.  
  741.     <p>(Note that this will send you to your nearest mirror
  742.     automagically. Cool, huh?)</p>
  743.     <br />
  744.     <hr />
  745.  
  746.     <h2><a name="Is_there_a_GD_module_available_f">Is there a GD
  747.     module available for Perl for Win32?</a></h2>
  748.  
  749.     <p> <font size="-1">GD</font> now works with Win32, and can be
  750.     installed using <font size="-1">PPM</font> (the Perl Package
  751.     Manager). <font size="-1">GD</font> is also shipped with the
  752.     Perl Resource Kit for Win32. This graphics library allows the
  753.     creation and some manipulation of industry standard <font size= 
  754.     "-1">GIF</font> format images.</p>
  755.     <br />
  756.     <hr />
  757.  
  758.     <h2><a name="What_is_CPAN_and_how_do_I_use_it">What is CPAN and
  759.     how do I use it?</a></h2>
  760.  
  761.     <p> <font size="-1">CPAN</font> is the Comprehensive Perl
  762.     Archive Network, a collection of pretty much every file you
  763.     could ever want for Perl programming. The original archive is
  764.     in Finland, but it is mirrored on <font size="-1">FTP</font>
  765.     servers throughout the world.</p>
  766.  
  767.     <p>You can connect to your closest <font size="-1">CPAN</font>
  768.     mirror using the <font size="-1">CPAN</font> redirector at <a
  769.     href="http://www.perl.com.">http://www.perl.com.</a> The
  770.     following <font size="-1">URL:</font></p>
  771.     <br />
  772. <pre>
  773.     <a href=
  774. "http://www.perl.com/CPAN/">http://www.perl.com/CPAN/</a>
  775. </pre>
  776.  
  777.     <p>will redirect your browser to the nearest <font size="-1">
  778.     CPAN</font> mirror (one on your continent and maybe only a few
  779.     hops away). This <font size="-1">URL</font></p>
  780.     <br />
  781. <pre>
  782.     <a href="http://www.perl.com/CPAN">http://www.perl.com/CPAN</a>
  783. </pre>
  784.  
  785.     <p>lets you pick a <font size="-1">CPAN</font> mirror site
  786.     yourself, as well as giving a little more information.</p>
  787.  
  788.     <p> <font size="-1">CPAN</font> is good for finding Perl for
  789.     Win32 distributions as well as modules and scripts. However,
  790.     read <a href="#How_can_I_use_modules_from_CPAN_"></a></p>
  791. <pre>
  792.  How can I use modules from CPAN?
  793. </pre>
  794.     for more information. <br />
  795.     <hr />
  796.  
  797.     <h2><a name="Is_there_a_library_to_read_or_wr">Is there a
  798.     library to read or write Microsoft Office or other application
  799.     files?</a></h2>
  800.  
  801.     <p>In general, there aren't any library modules to read or
  802.     write application files, like Microsoft Word, Microsoft Excel,
  803.     Microsoft Access, WordPerfect, Lotus 1-2-3, etc.</p>
  804.  
  805.     <p>However, many if not most major Windows applications now
  806.     support <font size="-1">OLE</font> Automation. You can use the
  807.     <font size="-1">OLE</font> Automation support of Microsoft
  808.     Office applications to read and write their file formats, for
  809.     example. See the documentation on your application for
  810.     information on its support for <font size="-1">OLE</font>
  811.     Automation. See <a href="#Is_there_a_way_to_use_OLE_Automa">Is
  812.     there a way to use OLE Automation servers from my Perl
  813.     script?</a> for more information.</p>
  814.  
  815.     <p>As a special case, many database files, like Microsoft
  816.     Access, FoxPro, dBase or Paradox files, can be accessed using
  817.     <font size="-1">ODBC</font> (Open DataBase Connectivity). See
  818.     <a href="#How_do_I_access_databases_from_m">How do I access
  819.     databases from my Perl script?</a> for details on how to use
  820.     <font size="-1">ODBC</font> with Perl for Win32.</p>
  821.     <br />
  822.     <hr />
  823.  
  824.     <h1><a name="AUTHOR_AND_COPYRIGHT">AUTHOR AND
  825.     COPYRIGHT</a></h1>
  826.  
  827.     <p>This <font size="-1">FAQ</font> was originally assembled and
  828.     maintained by Evangelo Prodromou. <a href= 
  829.     "mailto:evangelo@endcontsw.com">evangelo@endcontsw.com.</a> It
  830.     has been revised and updated by Brian Jepson of O'Reilly and
  831.     Associates, David Grove, David Dmytryshyn of ActiveState,
  832.     Henning Michael Møller-Nielsen of RTO and Kevin
  833.     Meltzer.</p>
  834.  
  835.     <p>This <font size="-1">FAQ</font> is in the public domain. If
  836.     you use it, however, please ensure that you give credit to the
  837.     original authors.</p>
  838.  
  839.     <p><!-- beginning of leaf footer--></p>
  840.  
  841.     <table width="100%">
  842.       <tr>
  843.         <td bgcolor="000000" width="70" height="31"><a href= 
  844.         "http://www.activestate.com/"><img src="ASbutton.gif" alt= 
  845.         "ActiveState Home Page" border="0" width="68" height=
  846.         "30" /></a></td>
  847.  
  848.         <td width="10"> </td>
  849.  
  850.         <td valign="middle" bgcolor="#cc0066"><font face=
  851.         "sans-serif" size="+1" color="#ff99cc">   
  852.         Win32 FAQ</font></td>
  853.       </tr>
  854.     </table>
  855.     <!-- end  of leaf footer-->
  856.   </body>
  857. </html>
  858.  
  859.