views:

44

answers:

2

I've got a rather large MySQL database of various pieces of text. I need to slightly modify approximately 90% of all entries using standard string manipulation algorithms and some regexps.

All of my current DB manipulation scripts are PHP frontends for a website. Recommendations for a language/technology to do this in?

Support for JSON encoding/decoding a plus.

+2  A: 

Php works great from the command line, and if you've got common libraries already for manipulating your database, you can reuse them.

Paul Huff
+1  A: 

I assume it's a run-once script, so performance and maintainability probably are not top of your priorities.

Depending on the size of your company/client and the bureaucratic overhead, the less hassle path is often to choose a language/API which is already known by the sysadmins/production teams and also already installed on the target box, so I would check that before.

Perl-DBI-Mysql is more common than say PHP|Python, which in turn are more common than Ruby + Mysql bindings. Perl sounds like a reasonable choice as DBI is fairly easy and perl's regex power is unmatched.

ggiroux