Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I would like to call a perl module (whatever.pm) from a .asmx file (whatever.asmx). Does anyone know how to do this and if possible can you give me a simple code example? Thanks...
  • Comment on Calling a Perl Module From A .asmx File???

Replies are listed 'Best First'.
Re: Calling a Perl Module From A .asmx File???
by ikegami (Patriarch) on May 24, 2007 at 17:27 UTC
    If you were to call Perl from C, you'd follow the instructions in perlembed labeled "Calling a Perl subroutine from your C program". It should be trivial to convert that to assembler (assuming that's what .asmx is).
Re: Calling a Perl Module From A .asmx File???
by blazar (Canon) on May 24, 2007 at 16:57 UTC
    I would like to call a perl module (whatever.pm) from a .asmx file (whatever.asmx).

    "call"? Perl modules are generally used or required. And Perl files are not really bound to have any particular extension. So if your .asmx file is a Perl file, then you may do that easily. If it is a source file in some other programming language (assembler) then I suppose you're on the route of having to embed a Perl interpreter. Have fun!

      .asmx files are usually ASP .NET web services, nothing to do with assembler. (Though I'm not sure why someone would expect to be able to call a Perl module from there, unless they mean via a SOAP::Lite web service.)
        .asmx files are usually ASP .NET web services, nothing to do with assembler.

        Oh, .NET! I don't really know anything about it. But then I see a thingie from ActiveState that could have helped: unfortunately it seems to be dead now. PerlNET still seems to be part of PDK though.