In addition to Alpicolas excellent and accurate comments, there are two more things that I have found are often the cause of that "helpful" 550 Internal server error when someone is just starting out:
1) Not only does the script need to be executable, but it should be set with permissions of 755 on DreamHost (given the use of suEXEC). Less restrictive executable permissions can cause that error on DreamHost.
2) If you edited the .cgi file on your computer (rather than using an native nix editor in the shell), make sure that you have saved the file with *nix style line-endings (which most good programmers' editors will allow you to do) and that you have uploaded it to your account in ASCII mode.
These two issues are what I have found to be the most common on this forum.