Try checking the return value on the open() and close() - even if it doesn't solve this problem it's a good habit to get in. You could be getting a useful error and not know it! Example:
open(WEBOS,"$com|")
or die "Couldn't open '$com|': $!";
$com = join('', <WEBOS>);
close(WEBOS)
or die "Couldn't close '$com|': $!";