Perl Samples
------------
1 Perl Sample Files Purpose
2 How to install Perl on UNIX/LINUX
3 How to install Perl on Windows
4 How to Run Perl Samples


1 Perl Sample Files Purpose
---------------------------
    Sample: demo.pl
    Purpose: 
        This sample program demostrates how to access database by Perl. 
        . create table pl_Employees
        . use 'do' method to insert records into Employees
        . use bind_columns and fetch method to show Employees.
        . Use do method to Update records in Employees.
        . Use prepare,execute and fetchrow_array to show Employees.
        . Use do method to Delete all records in Employees.
        . Use prepare,bind_param and execute method to insert records 
          into Employees.
        . Use prepare and fetchrow_arrayref to show Employees.
        . Use execute, prepare and execute method to update even Id in 
          Employees.
        . use prepare, execute and fetchrow_hash to show Employees.
        . use execute method to delete all records in Employees.
        . use do method to Drop Employees.

    Sample: perlsearch.pl
    Purpose:
        This sample program demostrates how to do a simple full-text search.

    Sample: storefile.pl
    Purpose:
        This sample program demostrates how to input LONG VARCHAR by file.

    Sample: fetchfile.pl
    Purpose:
        This sample program demostrates how to output LONG VARCHAR field to
        a file.

2 How to install Perl on UNIX/LINUX
---------------------------------
    Steps:
        1. Install perl fisrt, you may need to build from source code in 
           UNIX. For more information and resource, please reference:
           Perl Reference

             http://www.perl.com/reference/

        2. Then install DBI.
           DBI is a database interface module for Perl. It defines a set of 
           methods, variables and conventions that provide a consistent 
           database interface independent of the actual database being used. 
           
            perl Makefile.PL
            make
            make test
            make install
           
           For more information and resource, please reference 
           http://www.symbolstone.org/technology/perl/DBI/index.html

        3. Install DBD:DBMaker.
           DBD:DBMaker is binary package of DBI.
           
            perl Makefile.PL
        make
        make test
        make install

        4. Start the 'DBSAMPLE5' database in client-server mode.
           Execute 'perl demo.pl' run the sample program.

3 How to install Perl on Windows
------------------------------------
    Steps:
        1. Install perl fisrt, you may need to build from source code or 
           install binary files in Win32. For more information and resource, 
           please reference: Perl Reference

             http://www.perl.com/reference/

           Perl for Win32

             http://www.activestate.com/

        2. Then install DBI.
           DBI is a database interface module for Perl. It defines a set of 
           methods, variables and conventions that provide a consistent 
           database interface independent of the actual database being used. 
           For more information and resource, please reference:

             http://www.symbolstone.org/technology/perl/DBI/index.html

           To install this DBI for ActiveState PPM package, run the 
           following command:

             ppm install DBI.ppd
             or 
             install online with:  ppm install DBI

        3. Install DBD:DBMaker.
           DBD:DBMaker is binary package of DBI, you can download the
           resource from 

             ftp://www.dbmaker.com.tw/pub/DBMaker/driver/perl/DBD/

           To install this DBD:DBMaker for ActiveState PPM package, run the 
           following command:

           ppm install DBD-DBMaker.ppd
           or
           set VC envionment variables to build DBD source code 
               in DBD-DBMaker-0.15
               
           perl Makefile.PL
           nmake
           nmake test
           nmake install
             
           For more information and resource, please contact with DBMaker support.    

        4. Start the 'DBSAMPLE5' database in client-server mode.

4. How to run Perl samples

   (1) demo.pl
       . Execute 'perl demo.pl' run the sample program.

   (2) perlsearch.pl
       . copy perlsearch.pl to the web server cgi-bin directory.
       . chmod perlsearch.pl to executable.
       . on any browser, type the following command:
         http://web_host_ip/cgi-bin/perlsearch.pl

   (3) storefile.pl
       . Execute 'perl storefile.pl local_filename'


   (4) fetchfile.pl
       . Execute 'perl fetchfile.pl stored_filename new_output_filename'
