Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Exiting backticks early

by sundialsvc4 (Abbot)
on Mar 08, 2018 at 03:33 UTC ( #1210497=note: print w/replies, xml ) Need Help??

in reply to Exiting backticks early

To me, this is a classic “XY problem.”   You describe your present approach, not the outcome that you need to achieve.

If at all possible, you need to be able to tell the program that you are shelling-out to that you only want for it to return so-many rows.   (Or, might you be able to do the job within the Perl program?)   It is wasteful at best, and uncertain/unstable at worst, to rely upon “killing” a child-process that is merely doing what you told it to do.   If it is at all feasible to change the target program to support your actual requirements (through, say, the addition of a new command-line parameter), then I strongly counsel you to do so.   This is your best and most-certain bet.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1210497]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2018-07-20 05:05 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (424 votes). Check out past polls.