cosmicsoup has asked for the wisdom of the Perl Monks concerning the following question:
The value for $today is always empty!my $today = getMaxDate(); sub getMaxDate { my $sqltoday; my $SQLDT = qq(select max(convert(char(12), Modified_Date, 101)) from +Metrics); my $dbhdt=Sybase::DBlib->dblogin($user, $pw, $server); $dbhdt->dbcmd($SQLDT); $dbhdt->dbsqlexec; $dbhdt->dbresults; while (@data = $dbhdt->dbnextrow) { $sqltoday = $data[0]; } return $sqltoday; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returning a value from a sub routine
by dragonchild (Archbishop) on Nov 12, 2004 at 15:07 UTC | |
|
Re: Returning a value from a sub routine
by Roger (Parson) on Nov 12, 2004 at 15:02 UTC | |
|
Re: Returning a value from a sub routine
by ikegami (Patriarch) on Nov 12, 2004 at 14:53 UTC | |
|
Re: Returning a value from a sub routine
by gnu@perl (Pilgrim) on Nov 12, 2004 at 15:52 UTC |