mysql> use test; Database changed mysql> show tables; Empty set (0.00 sec) mysql> create table nulltest (leeresfeld int(1) default null); Query OK, 0 rows affected (0.02 sec) mysql> insert into nulltest values (null); Query OK, 1 row affected (0.01 sec) mysql> select * from nulltest; +------------+ | leeresfeld | +------------+ | NULL | +------------+ 1 row in set (0.02 sec) mysql>\q Bye format_c@server:~> cd perl_scripts/ format_c@server:~/perl_scripts> vi test.pl format_c@server:~/perl_scripts> cat test.pl && perl test.pl use strict; use DBI; my $dbh = DBI->connect('DBI:mysql:database=test;host=localhost;','test','test') or die DBI::errstr(); my $sth = $dbh->prepare('SELECT * FROM nulltest') or die $dbh->errstr(); $sth->execute() or die $dbh->errstr(); my $i = 0; while (my @row = $sth->fetchrow_array()) { print ++$i,"\n"; } $sth->finish(); $dbh->disconnect(); exit; 1 format_c@server:~/perl_scripts>