"just fine" is a little too vague, posting a sample command line session would be better.
If the tsql you're using is this one: http://linux.die.net/man/1/tsql , then the problem is that it enters an interactive shell that you have to exit from, that's why it's hanging there (it's waiting for input). A quick Googling suggests that http://linux.die.net/man/1/bsqlodbc or http://linux.die.net/man/1/bsqldb might be better suited for your use case.
If you're going to be running multiple queries on the database in one session, then yes, DBI is the way to go. However, for a single SELECT query run once every few minutes that just spits out a value, backticks are often an acceptable solution. A little better might be the capture function from IPC::System::Simple (that has better error handling), and IPC::Run even lets you set timeouts on external commands.
In reply to Re^3: Trying to connect to MSSQL and return result. Script hangs indefinitely.
by Anonymous Monk
in thread Trying to connect to MSSQL and return result. Script hangs indefinitely.
by Logic_Bomb421
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |