Read the DBD::Sybase docs carefully. Sybase can return multiple result sets from a query, and most of the system stored procedures do in fact do that. You should structure your result retrieval something like this:
Note that you need to check for syb_more_results after your first call to fetch*.do { while(my $row = $sth->fetchrow_array) { # do something with the row } } while($sth->{syb_more_results});
Update
I forgot to add: some of what dbcc prints isn't even a result set, it's a server message (the output of print). You'll need to install an error handler, as outlined in the docs under "Sybase-specific attributes". There's an example there of how to print showplan output that you can use as a model.
In reply to Re: DBD:Sybase (how to get output from sp_* procs)
by VSarkiss
in thread DBD:Sybase (how to get output from sp_* procs)
by Bone_Scavenger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |