in reply to Sending multiples network messages

Have a look at Filesys::SmbClientParser. The sendWinpopupMessage method seems to be just your ticket:
use strict; use Filesys::SmbClientParser; my $path="/path/to/smbclient"; my $target="kasbah"; my $smb=Filesys::SmbClientParser->new($path, { user => "camel", passwo +rd => "humps" }); $smb->sendWinpopupMessage($target, "My tailor is rich.");
I don't have the module installed (got the above from the online docs), nor have I access to a handy Windows box to test, so the above code comes with the usual guarantee for untested code: use at your own risk. Or, as the case may be, at your camel's risk.

Untested code fun aside, the module should save you an ugly and expensive system() call.

CU
Robartes-

Update: Fixed small booboo: forgot to define $target. Then again, this is untested code, so there :).