Perl isn't relevant to this.
The data is in the program_name column of master..sysprocesses, which is indexed by spid, and the spid of the executing process is in @@spid IIRC. Take a look at how sp_who works, and add the column to the relevant query. You can get the text with:
use sybsystemprocs sp_helptext sp_who
In reply to Re: Sybase process view
by VSarkiss
in thread Sybase process view
by ccn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |