I'm writing a Cocoa app for Leopard that, given a directory of text files, will scan through them, looking for a search pattern (let's pretend they're source files and I just want to find C comments). It will then present the results to the user.
While I think I could certainly do this with Cocoa, it feels like it's really meant to be handed off to a scripting language. But which would be better for this task and why? I'm thinking with going with Ruby (I own a book on it, but I've never had a good reason to learn it too well), but I'm certainly open to others (Perl obviously springs to mind).
The kind of searching I'll be doing isn't too advanced, but I would like to integrate this into my Cocoa app one way or another.
How should I best approach this?