in reply to
my and its use
It's because of the or die part:
|| die "Cannot connect!: $!\n$dbh->errstr";
[download]
You are referencing $dbh on the same line, so declare $dbh before you try to connect.
Jeff
Comment on
(jeffa) RE: my and its use
Download
Code
In Section
Seekers of Perl Wisdom