Editors for writing Perl/CGI code:
ActiveState (the generous folks who provide ActivePerl for free) also sells Visual Perl, a Perl plug-in for Visual Studio .NET.
EditPlus is a shareware ($30) text/HTML/programming editor with syntax highlighting for various languages.
The DzSoft Perl Editor offers syntax coloring (and checking), a builtin "run" option that you can use to test your scripts (and view error messages), a file template for new files, quick-insert shortcuts, and other useful tools. This program is shareware ($49) but a demo is available for download and evaluation.
OptiPerl is a visual developing environment and editor for creating, testing, debugging and running perl scripts. A free trial download is available, and if you decide to keep it, the standard license is $39.
Perl Editor by EngInSite is an integrated development environment for creating, testing and debugging Perl scripts.
You can use the built-in TextEdit application to edit CGI files.
BBEdit is a more powerful editor that support syntax coloring and other features. It's quite expensive ($125), but well worth it given all the features. A 30-day demo is available.
Affrus is a Perl editing and debugging environment for Mac OS X. A bit cheaper than BBEdit ($99), and a demo is available.
TextMate is another quality text editor for the Mac. Shareware (€39)