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.
In reply to Re: Slicing the output of a command
by KurtSchwind
in thread Slicing the output of a command
by fbicknel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |