sign string with certificate

[email protected] ("Reif Peter") Mon, 30 Jun 2008 16:33:32 +0200
Newsgroups perl.crypto
Message-ID <B7FF1455C90F974C98CD3AA74E27E29301B30EBE@exadv11.host.magwien.gv.at>
How do I write a script in perl that signs a string with a certificate
(e.g. a SSL server certificate) to get a pkcs7 signature. I want a pkcs7
signature, because it contains the signing certificate and the ca.

Thanks
Peter