Do you by asking:
Does anyone knows a way how to send to my program any type of signal in my case?
mean that you want to send a message to Word, that gets processed by the message loop in your perl program?
If so, you could try:
#!/usr/bin/perl -w
use Win32::API;
my $find = new Win32::API("user32", "FindWindowA", 'PN', 'N')
or die "No find";
my $send = new Win32::API("user32", "SendMessageA", 'NNNN', 'N')
or die "No send";
# Find any Word window
my $wordhandle=$find->Call("OpusApp",0);
print "Handle: ",$wordhandle,"\n";
$send->Call($wordhandle, 0x0010, 1, 0) if ($wordhandle);
This should close Word and generate a "Quit" event.
/brother t0mas