use DBI;
use DBD::ODBC;
my $username = shift;
my $password = shift;
my $oracle_db = shift;
# --- Get data from DB
$dbh = DBI->connect("DBI:ODBC:$oracle_db","$username","$password") or
die ("Could not make connection to database:\n".
"$DBI::errstr\n");
$dbh->{RaiseError} = 1;
my $sql_statement = 'SELECT A.LABEL, A.COMMENTS
FROM mydb.table WHERE A.LABEL = ?';
$parm_cursor = $dbh->prepare ( $sql_statement );
$parm_cursor->execute('MYLABEL');
(my $label, my $comment) = $parm_cursor->fetchrow_array();
# --- Verify output from DB
print "$comment\n";
my @nums = map ord, split //, $comment;
print join ' ', @nums,"\n";
# --- Verify that console can print a degree sign
my $str = "30 degrees = 30".chr(186);
@nums = map ord, split //, $str;
print "$str\n";
print join ' ', @nums,"\n";
####
INITIAL VALUE IS 0.0?
73 78 73 84 73 65 76 32 86 65 76 85 69 32 73 83 32 48 46 48 63
30 degrees = 30º
51 48 32 100 101 103 114 101 101 115 32 61 32 51 48 186
####
INITIAL VALUE IS 0.0º;
73 78 73 84 73 65 76 32 86 65 76 85 69 32 73 83 32 48 46 48 186
30 degrees = 30º;
51 48 32 100 101 103 114 101 101 115 32 61 32 51 48 186