Perl vs. .Net regular expressions

Discussion in 'Perl Misc' started by tconti@hotmail.com, Dec 21, 2004.

  1. Guest

    Howdy:

    I am looking for a little input on an issue we are grappling with. We
    are updating our site to be Unicode compliant. We have some
    applications running under Perl 5.6.1 which has "sketchy" support for
    Unicode. So there is a push to re-write these applications in .Net
    (C#) because we are largely a Windows shop. Most of our Perl code is
    regex heavy. .Net does have a fairly robust regex engine, but I have
    never perfmance tested it against Perl. Has anyone done such testing
    and what are your thoughts/results? Also, if we choose to stick with
    Perl we would need to move to 5.8 for Unicode support. Would this just
    be a simple recompile or would there be any other issues that would
    need to be addressed?
    Please let me know what you think.

    Happy Holidays,
    Tom
    , Dec 21, 2004
    #1
    1. Advertising

  2. Matt Garrish Guest

    <> wrote in message
    news:...
    > Howdy:
    >
    > I am looking for a little input on an issue we are grappling with. We
    > are updating our site to be Unicode compliant. We have some
    > applications running under Perl 5.6.1 which has "sketchy" support for
    > Unicode. So there is a push to re-write these applications in .Net
    > (C#) because we are largely a Windows shop. Most of our Perl code is
    > regex heavy. .Net does have a fairly robust regex engine, but I have
    > never perfmance tested it against Perl. Has anyone done such testing
    > and what are your thoughts/results?


    I can't speak to any possible speed differences, but I have found .Net
    regexes to be a pain-in-the-ass to deal with for other reasons. (Mostly
    because of all the extra lines of code necessary to do simple tasks, and
    because of the limited modifiers that can be used.) If all your code does is
    simple searches and replaces, though, it might not be so painful to port
    over (I just ported a 10000+ line Perl/Tk app to C# in a little over a
    week).

    > Also, if we choose to stick with
    > Perl we would need to move to 5.8 for Unicode support. Would this just
    > be a simple recompile or would there be any other issues that would
    > need to be addressed?
    > Please let me know what you think.
    >


    If you're on Windows, you shouldn't need to compile Perl. Just get the
    latest release of ActivePerl or IndigoPerl. I had to upgrade the Perl distro
    on one the servers at work for exactly the reason you note, and it only took
    about ten minutes to uninstall the old version and install the new. Take a
    look at perldelta for 5.8 and see if any of the changes affect the coding in
    your scripts, but if all you're using is regexes than I doubt you'll run
    into any issues upgrading. The only thing I would note is that you make a
    list of all the non-core modules you're using (and going to need to
    reinstall) *before* you upgrade to reduce the downtime.

    Matt
    Matt Garrish, Dec 21, 2004
    #2
    1. Advertising

  3. wrote:
    > Howdy:
    >
    > I am looking for a little input on an issue we are grappling with. We
    > are updating our site to be Unicode compliant. We have some
    > applications running under Perl 5.6.1 which has "sketchy" support for
    > Unicode. So there is a push to re-write these applications in .Net
    > (C#) because we are largely a Windows shop. Most of our Perl code is
    > regex heavy. .Net does have a fairly robust regex engine, but I have
    > never perfmance tested it against Perl. Has anyone done such testing
    > and what are your thoughts/results? Also, if we choose to stick with
    > Perl we would need to move to 5.8 for Unicode support. Would this just
    > be a simple recompile or would there be any other issues that would
    > need to be addressed?
    > Please let me know what you think.
    >
    > Happy Holidays,
    > Tom
    >


    Is there any reason you can't update your version of Perl?
    Peter Hickman, Dec 21, 2004
    #3
  4. Guest

    Bob Walton wrote:
    > wrote:
    > ...
    > > I am looking for a little input on an issue we are grappling with.

    We
    > > are updating our site to be Unicode compliant. We have some
    > > applications running under Perl 5.6.1 which has "sketchy" support

    for
    > > Unicode. So there is a push to re-write these applications in .Net
    > > (C#) because we are largely a Windows shop. Most of our Perl code

    is
    > > regex heavy. .Net does have a fairly robust regex engine, but I

    have
    > > never perfmance tested it against Perl. Has anyone done such

    testing
    > > and what are your thoughts/results? Also, if we choose to stick

    with
    > > Perl we would need to move to 5.8 for Unicode support. Would this

    just
    > > be a simple recompile or would there be any other issues that would
    > > need to be addressed?

    >
    > On Windoze, you won't have to compile Perl -- just install it
    > from ActiveState or maybe Indigo. Just one word of caution:
    > Assuming you're using ActiveState's Perl, don't simply install
    > Perl 5.8.4 over top of Perl 5.6.1, as you'll find that ppm
    > (ActiveState's Perl Package Manager) won't work. Uninstall and
    > completely delete Perl 5.6.1, then install Perl 5.8.4. You'll
    > have to reinstall all your nonstandard packages as well.
    >
    > You probably won't have to change your code at all, except maybe
    > to add or modify binmode() calls to properly handle your Unicode
    > stuff.
    >
    > ...
    > > Tom

    > --
    > Bob Walton
    > Email: http://bwalton.com/cgi-bin/emailbob.pl
    >
    >
    > -----------== Posted via Newsfeed.Com - Uncensored Usenet News

    ==----------
    > http://www.newsfeed.com The #1 Newsgroup Service in the

    World!
    > -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19

    Servers =-----

    Thanks for all of the replies!!!

    I should have been more explicit when I meant re-compile (my bad...).
    Our code is compiled into executables using ActiveState's PerlApp (v
    5.0.3). If we upgrade to Perl 5.8 will we need to upgrade the PerlApp
    license or does it include the packages of the locally installed
    version of Perl (i.e. if I have 5.8 installed it will include these
    packages in the executable).

    Thanks and Happy Festivus,
    Tom
    , Dec 23, 2004
    #4
  5. Matt Garrish Guest

    <> wrote in message
    news:...
    >
    > I should have been more explicit when I meant re-compile (my bad...).
    > Our code is compiled into executables using ActiveState's PerlApp (v
    > 5.0.3). If we upgrade to Perl 5.8 will we need to upgrade the PerlApp
    > license or does it include the packages of the locally installed
    > version of Perl (i.e. if I have 5.8 installed it will include these
    > packages in the executable).
    >


    Read the docs:

    <quote>
    PerlApp packages the Perl program with all the required Perl modules and a
    modified Perl interpreter into the binary executable. When the executable is
    run, it searches for modules within itself before searching the file system.
    Building freestanding applications with PerlApp ensures that the executabl
    is always executed by the desired version of Perl, even if the target system
    is running a different version.
    </quote>

    Why pay for PerlApp, though, when there are free alternatives for compiling
    Perl code into an executable?

    http://par.perl.org/index.cgi

    Matt
    Matt Garrish, Dec 23, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dustin D.
    Replies:
    1
    Views:
    11,148
  2. RN
    Replies:
    0
    Views:
    2,540
  3. Jay Douglas
    Replies:
    0
    Views:
    593
    Jay Douglas
    Aug 15, 2003
  4. codecraig

    Regular Expressions - Python vs Perl

    codecraig, Apr 21, 2005, in forum: Python
    Replies:
    30
    Views:
    5,067
    Ilpo =?iso-8859-1?Q?Nyyss=F6nen?=
    Apr 26, 2005
  5. Noman Shapiro
    Replies:
    0
    Views:
    222
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page