Probably a rare needed feature, but I had to count the number lines in a text file - in LaTeX.
It is possible to generate random numbers in a TeX document. For a gimmick I wanted a random line from a text file in my slides. The first step was to find a random number.
For my slides I sometimes want to disable parts of the presentation, as example: if the operating system is Linux, I don’t need Solaris installation instructions. The \ifthenelse{<condition>}{...true...}{...false...} from the ifthen package works very well for normal frames, but it fails if there are examples (verbatim environment) in the code.