# Is there a “selective” input command in LaTeX?

I'm likely going to have to write a document that includes some portions of source code, which I'd rather keep in separate source files. I know that I can include the contents of those files in my document using \input{example.cpp}, and use various environments to pretty-print the code, but the source files will certainly start with a few commented lines explaining what the code does, whether it can be redistributed and so on, and this will be irrelevant in the main document.

Is there a package or a specific command that allows me to omit those lines when including an external file?

-
Use the listings package with the firstline option:
\lstinputlisting[firstline=2]{file}

@Anthony: There is also a lastline option if you need it. –  Martin Scharrer Feb 1 '11 at 20:25