in reply to Slicing the output of a command
As you have already determined, the cat runs to completion. The reason is sort of obvious. Perl doesn't know, in advance, that you only want the first few lines of output. It's going to execute everything between the back-ticks first.
|
|---|