Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: retrieve the value of a system call in a non blocking mode

by kcott (Archbishop)
on Dec 06, 2013 at 11:31 UTC ( [id://1065961]=note: print w/replies, xml ) Need Help??


in reply to Re^2: retrieve the value of a system call in a non blocking mode
in thread Do not display the command result in the console (updated)

"UPDATE moved misplaced paren"

You've removed what you originally posted so I don't know what you were attempting to fix (see "How do I change/delete my post?"). Regardless, what you now have is still not correct (I assume you didn't intend or die $! to be part of the shell command).

See the examples in the system documentation for syntax and how to check for errors. You may also find the autodie pragma of interest.

If you are unable to test your posted solutions, please clearly indicate this.

Also, what you've shown as corrections later in this thread are also wrong (for the same reason). [Update (Clarification of "later in this thread"): I'm referring to "Re^4: retrieve the value of a system call in a non blocking mode" which is later than the post I'm replying to but appears physically earlier on this page.]

-- Ken

Replies are listed 'Best First'.
Re^4: retrieve the value of a system call in a non blocking mode
by taint (Chaplain) on Dec 06, 2013 at 14:14 UTC
    Greetings, kcott.

    Odd. It seemed to work for me. In fact, it was by virtue of testing it. That I discovered what I termed as being a HOMER moment above, was wrong.

    I'm afraid I was so embarrassed by the earlier example. I corrected it. Bad choice. I'd return it. But, now, I'm afraid I'll just mess up the order worse.

    So for the sake of clarity. I'll post my HOMER moment here:

    system("echo test > myfile.txt") or die $!;
    Sorry for messing things up. I'll just "suck up", and eat my mistakes in the future. Or better, take more care not make any. ;)

    Best wishes.

    --Chris

    Hey. I'm not completely useless. I can be used as a bad example.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1065961]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found