These are actually two different technologies. ActiveState provides an ActiveX scripting engine for Perl with their Windows distribution, called PerlScript. This allows you to use Perl in all the places that, for example, you can also use VBScript or JavaScript, including ASP, client-side web scripting (that is, if the client also has ActivePerl) and SQL Server Data Transformation Services.

I've used Perl(Script) quite successfully within SQL Server DTS and love it. It allows me to do all sorts of things that you can't easily do with the default VBScript, such as Perl regexes and SMTP email. The best part is being able to use modules off of CPAN, where with VBScript you'd normally have to find and install an appropriate COM object.

Now, SQL Server also implements extended stored procedures, such as xp_cmdshell, but my knowledge of them is somewhat limited. However, they sound similar to the Sybase versions. As far as I know, they can only currently be written in C/C++, and then should be compiled into a DLL.

My colleagues and I have discussed something like this idea before, but we're Perl coders with only vague experience with C++, so it's never gone past the concept stage. Our main desire was to have Perl regexes within Transact SQL, but it would be great to have the complete functionality of Perl at hand.

If you do develop a working way to call Perl from Sybase, please post the code, or explain how you've done it. It's quite possible it might also be applicable to SQL Server, due to its shared ancestry with Sybase.

-jehuni


In reply to Re: Perl in the database? by jehuni
in thread Perl in the database? by mpeppler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.