On Jul 17, 2006, at 6:08 PM, Eric Wilhelm wrote:
And I really have to ask why you need to fork a perl one-liner in your
ruby :-)  If ruby's C API is so sweet and it has threads, just embed a
perl interpreter in a thread.

At the risk of starting an argument, there are plenty of things that perl does (especially on the command line) that are rather powerful. I normally use perl where I would use awk, and this seems like a great application.

While his example is intentionally simple (all it does is print to stdout), something like this doesn't get expressed as well in ruby or awk:

perl -ne '/(foo)(bar)/; reverse $1; print "$1$2"'

It also doesn't really lend itself to going to the effort of embedding the perl interpreter (which is rife with leaks, last I checked) either.

/me removes himself from the soapbox

--
Erik Hollensbe
[EMAIL PROTECTED]
_______________________________________________
PDXRuby mailing list
[email protected]
IRC: #pdx.rb on irc.freenode.net
http://lists.pdxruby.org/mailman/listinfo/pdxruby

Reply via email to