How to get the output from an ICQ clent

Hello everybody, In my script I want to execute and print out the output from the ysm ICQ clent after logging in. I tried this my $pid = open my $readme, "- ", "ysm" or die "Can't fork: $!\n"; while (<$readme>) { print "$_\n"; kill 9 => $pid; close $readme; but executing the script invokes a blank screen whitout any output.