Writing testable code is one of my mantras. I was particularly impressed by
this YAPC talk on
Testing large software with Perl where 10000 unit tests where written in 3 years to test 320 000 lines of Perl code. (Disclaimer: I did not attend the conference, I just read the online material.)
Perl Testing, a developer's notebook is a well written book on the subject.
Do one thing, do it well from the Unix philosophy is another high up on my list. Eric Raymond's The Art of Unix Programming was an enlightening read for me.