Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl vs. .Net regular expressions

Reply
Thread Tools

Perl vs. .Net regular expressions

 
 
tconti@hotmail.com
Guest
Posts: n/a
 
      12-21-2004
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

 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      12-21-2004

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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


 
Reply With Quote
 
 
 
 
Peter Hickman
Guest
Posts: n/a
 
      12-21-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) 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?
 
Reply With Quote
 
tconti@hotmail.com
Guest
Posts: n/a
 
      12-23-2004

Bob Walton wrote:
> (E-Mail Removed) 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

 
Reply With Quote
 
Matt Garrish
Guest
Posts: n/a
 
      12-23-2004

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl/Python regular expressions vs. Boost.regex? skip@pobox.com Python 1 10-25-2008 07:04 PM
Regular Expressions - Python vs Perl codecraig Python 30 04-26-2005 05:17 AM
posix vs perl regular expressions RN Perl 0 09-10-2003 06:25 PM
perl regular expressions return last matched occurence? Dustin D. Perl 1 08-28-2003 01:51 AM
Add custom regular expressions to the validation list of available expressions Jay Douglas ASP .Net 0 08-15-2003 10:19 PM



Advertisments