good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Slicing the output of a commandby KurtSchwind (Chaplain) |
on Jul 09, 2015 at 19:43 UTC ( [id://1134018]=note: print w/replies, xml ) | Need Help?? |
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.
-- “For the Present is the point at which time touches eternity.” - CS Lewis
In Section
Seekers of Perl Wisdom
|
|