BBEdit, definitely. Though I myself, since I haven't yet purchased BBEdit, use TextEdit and vi. TextEdit for perl or anything else, so long as it's not an HTML file (TextEdit doesn't display HTML files properly). Vi for the webpages.
If you happen to have Apple's developers' tools, there is an OS X version of Simpletext that seemed to work well for editing, though I seem to remember that it wasn't very stable.