Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Perl DBD::SQLAnywhere API » Writing Perl scripts that use DBD::SQLAnywhere

Writing Perl scripts that use DBD::SQLAnywhere Next Page

Loading the DBI module


To use the DBD::SQLAnywhere interface from a Perl script, you must first tell Perl that you plan to use the DBI module. To do so, include the following line at the top of the file.

use DBI;

In addition, it is highly recommended that you run Perl in strict mode. This statement, which for example makes explicit variable definitions mandatory, is likely to greatly reduce the chance that you will run into mysterious errors due to such common mistakes as typographical errors.

#!/usr/local/bin/perl -w
#
use DBI;
use strict;

The DBI module automatically loads the DBD drivers, including DBD::SQLAnywhere, as required.