Perl vs. .Net regular expressions

T

tconti

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
 
M

Matt Garrish

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
 
P

Peter Hickman

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?
 
T

tconti

Bob said:
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.

...
--
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
 
M

Matt Garrish

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top