\d (digit character class), regular expressions, 203, 436
data retrieval
all records from database, 38–41
code example, 56–58
fetching from Internet, 306
some records from database, 41–42
data source name (DSN)
case sensitivity, 20
database driver name, 20
database name, 20
password, 21
port number, 21
server address, 21
username, 21
data storage
isolating from programs, 3
reliable, 3
data type
BIGINT, 5
BLOB, 5, 29
CHAR, 5, 29
DATE, 5, 29
DATETIME, 5
DOUBLE, 5
FLOAT, 5
INTEGER, 5, 29
REAL, 29
SMALLINT, 5, 29
TIME, 5, 29
TIMESTAMP, 5, 29
VARCHAR, 5, 29
database
common problems, 3
connecting to, 19–20
disconnecting from, 23
permission, 21
tables, 4–5
values in tables, 5
DataBase Driver (DBD)
checking availability, 17–18
data source name, specifying, 20
installation, 497–499
database handle, 19
DataBase Interface (DBI)
available_drivers method, 513
BasicSession.pm, 256
bind_col method, 513–514
bind_columns method, 514–515
checking availability, 17
command-line phone number lookup program, 356
command-line phonebook program, 349
commit method, 515
connect method, 515–516
DBI::errstr, 516
disconnect method, 516
do method, 517
dump_results method, 517
execute method, 517–518
fetch method, 518
fetchall_arrayref method, 518–519
fetchrow_array method, 519
fetchrow_hashref method, 519
importance of, 39
index.cgi (auction program), 185
index.cgi (photo album program), 442
Linux installation, 498–499
loading, 19, 39
photo_dumper.pl, 288
prepare method, 519–520
Quizzer.pm, 151
quote method, 520
report_html.pl, 327
report_text.pl, 324
rollback method, 520
soap_server.cgi, 301
view_all.cgi, 188
view_item.cgi, 196
Windows installation, 497–498
Database Management System (DBMS), benefits of using, 3
database name, 20
database transactions
ALTER TABLE command, 282
AutoCommit parameter, 277
BEGIN statement, 276–278, 282
COMMIT statement, 276, 278
CREATE INDEX command, 282
DROP DATABASE command, 282
DROP TABLE command, 282
eval block, 279–280
importance of, 275–276
LOCK TABLES command, 282
Perl DBI, 277
program listing, 283
pubslist table, 279
RaisError parameter, 279, 281
RENAME TABLE command, 282
ROLLBACK statement, 276, 279
transaction.pl, 279–281
TRUNCATE command, 282
data-definition operators, importance of, 6
data-manipulation operators, importance of, 6
date calculations, 325
DATE data type, 5
Date_Cmp function, SmallAuction.pm, 205
Date::Manip module, SmallAuction.pm, 205
DATETIME data type, 5, 182, 184
DBD. See DataBase Driver
DBD::Oracle driver, 23
$dbh database handle, 19
$DB_Handle, phonebook.cgi, 118
DBI. See DataBase Interface
DBI module
available_drivers method, 513
BasicSession.pm, 256
bind_col method, 513–514
bind_columns method, 514–515
checking availability, 17
command-line phone number lookup program, 356
command-line phonebook program, 349
commit method, 515
connect method, 515–516
DBI::errstr, 516
disconnect method, 516
do method, 517
dump_results method, 517
execute method, 517–518
fetch method, 518
fetchall_arrayref method, 518–519
fetchrow_array method, 519
fetchrow_hashref method, 519
index.cgi, 185
index.cgi (photo album program), 442
loading, 19, 39
photo_dumper.pl, 288
prepare method, 519–520
Quizzer.pm, 151
quote method, 520
report_html.pl, 327
report_text.pl, 324
rollback method, 520
soap_server.cgi, 301
view_all.cgi, 188
view_item.cgi, 196
$DBI::err, 24
$DBI::errstr, 21, 24, 34, 516
$DBI::state, 24
DBMS. See Database Management System
dbname=, data source name, 20
debugging
Perl diagnostic messages, 17
strict module, 18
default variable ($_), 156
Delete Confirmation window, graphical phonebook application, 379
delete, data from database, 76–79
DELETE method, BasicSession.pm, 257, 260
DELETE statement, 78, 504
Delete_Record subroutine, 77, 82
de-normalization, 14
dereference, array, 149
DESTROY method, BasicSession.pm, 88, 257, 263
diagnostic messages, debugging, 17
die function
command-line phone number lookup program, 356
error messages, 24
report_text.pl, 324
soap_server.cgi, 304
disconnect function
command-line phone number lookup program, 359
command-line phonebook program, 350
importance of, 19, 23, 516
index.cgi, 186
report_html.pl, 329
report_text.pl, 326
soap_server.cgi, 305
display_img.cgi
CGI module, 237
DBI module, 237
fetchrow_array method, 239
header function, 239
program listing, 243–244
strict module, 237
taint switch, 237
warnings switch, 237
Display_Page subroutine, phonebook.cgi, 124
Display_Results subroutine, phonebook.cgi, 120–121
do method, 34, 78, 517
dollar sign ($), regular expression, 203
Do_SubTable subroutine, photo_dumper.pl, 290
dot. See concatenation operator
DOUBLE data type, 5
double quote (qq) function
importance of, 39
SmallAuction.pm, 211
double-click, binding, 366
download
Apache software, 487, 492
MySQL software, 493, 496
Perl software, 482, 486
driver, checking availability, 17–18
DROP statement, SmallAuction.pm, 214
DROP TABLE statement, 33, 504
Drop_Down_Item_List function
index.cgi, 186
SmallAuction.pm, 208
Drop_Down_List function
view_all.cgi, 189
view_item.cgi, 199
DSN. See data source name
dump_results method, 517