Ever hear of function points? I'm about to take a test in software engineering where I'll need to know about them. You can estimate the number of function points in a program before writing it, and then use the number of function points to predict the effort required to write the program.
My textbook has a chart that says 1 FP can be coded in approximately 128 lines of C, 64 lines of C++, or 12 lines of SQL (to pick some interesting examples off the chart). Perl is not included. However, I see here that in one study, 1 FP could be implemented in 53 lines of C++