#!/usr/bin/perl use warnings; use strict; use IPC::Open3; $|=1; # you would run Sametime here, instead of bash my $pid=open3(\*IN,\*OUT, \*ERR , '/bin/bash'); # set \*ERR to 0 to send STDERR to STDOUT # # in your case, print the login name here my $cmd = 'date'; #send cmd to bash print IN "$cmd\n"; my $result = ; print $result;