How do i access sybase using isql and how do i get result set in perl script?

Hi,

How do i get result set in perl script using isql while connecting sybase server.
I have a perl script which connected to sybase and get the result set. but i wanted to get the result set. How do i get the result set in perl script not unix shell script..

$server ="ServerName";

open ISQL, "| isql -H hostname -U sa -P\"\" -S $server -D master " or die "Failed to open: $!";
print ISQL<< "EOF";
select srvname,srvid from sysservers
go
quit
EOF

any help really appreciated.. thanks in advance..

program it the proper way and use the API instead of parsing command output.

use Perl DBI and Sybase module