in reply to Retrieval of ID# as Integer from MySQL

$header_id contains a hash reference (in this case it is a blessed reference, indicating that you have created a DBI object), not your data. This is good, DBI is doing exactly what we want it to when we call execute(). It is creating a set handler to provide us with a few different ways of accessing the results of our query-- probably the most useful access method here is line-by-line as a list.

Your code should probably look more like:
$sth = $dbh->prepare( $SQL ); $sth->execute(); @header_ID = $sth->fetchrow_array();

Now $header_ID[0] will work more how you expected. For more information 'perldoc DBI' or this: Reading from a database.