My colleague wanted to extract all struct names of C++ code. He wanted a regexp to insert it into find/replace box. I really enjoyed watching him running perl -lne "print if /^\s*struct\b" file.cpp and starring at immediate result. It has saved him 3 hours work (he says so).