>>>>> "SHC" == Shawn H Corey <shawnhco...@gmail.com> writes:

  SHC> Dave Tang wrote:
  >> I wanted to ask why is Perl, in comparison to other programming
  >> languages, so powerful in text processing?

  SHC> Undoubtedly, when it was written, Perl was the most powerful text
  SHC> processing language available.  This is no longer the case (thanks
  SHC> largely to Perl :).  Today's scripting languages have the same text
  SHC> processing abilities as Perl.  You will find this true of Perl's
  SHC> documentation; some of it has not been updated in quite some time.

why would documentation that is accurate need to be updated? and each
new version of perl has added many more perldocs including tutorials,
quick references and more? as for text processing, see my other
post. most other langs still don't have perl's text munging power no
matter how loudly they claim to. power is not only speed but
expressiveness. my favorite simple example of how perl's text and other
ops work well together is a trivial parser for a simple key=value file
with one entry per line.

use File::Slurp ;
my %config = read_file( $file ) =~ /^(\w+)=(.*)$/mg ;

that is concise, clear and not terse. show me a better simple parser in
any other lang. that is text processing power. you can parse out the
keys/values line by line and also assign them to a hash to be used later
in the program. that is what config parsing should be and too often
isn't. complexity isn't the same as power.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to