in reply to Re: Calling perl from java
in thread Calling perl from java

Given the highly OO nature of Java's new regex classes, they take far more lines of code to do the same thing as a Perl regex (not to mention that ?{ } isn't quite Perl Compatible :). Calling the Perl code without shelling-out will almost certainly be easier than dealing with Pattern.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

:(){ :|:&};:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: Calling perl from java
by revdiablo (Prior) on Oct 15, 2003 at 23:52 UTC

    As a longtime user and lover of Perl, I have to disagree with your assessment of Java's regex support. While it may be true that dealing with the Pattern object is a real pain, in the 1.4 JDKs they have also added to the String object .matches(), .split(), and other handy methods for dealing with regular expressions. Though you may still have your qualms about writing this type of code in Java (I for one abhor the hoops one has to jump through to get certain metacharacters properly quoted and escaped), it's not quite as bad as you make it seem. :-)

    Update: oooh, downvotes! Apparently the monks don't like posts that are anything less than completely critical of Java, even when they are correcting an error of misunderstanding, and point out something else bad about Java. Very nice. Sorry for the whining. 8^\