Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by taint (Chaplain)
on Dec 06, 2013 at 00:56 UTC ( [id://1065869]=note: print w/replies, xml ) Need Help??


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

D'OH! Had a bit of a HOMER moment there. :P

What I should have put above was

system("echo test > myfile.txt" or die $!); system("cat myfile.txt" or die $!);
NOTE: the misplaced paren in my earlier post.
sorry 'bout that.

--Chris

UPDATE: I should probably mention, that it might be more elegant to test the existence of the file myfile.txt before cattting it, rather than dieing. If interested. I'd post an example.
Hey. I'm not completely useless. I can be used as a bad example.

Replies are listed 'Best First'.
Re^5: retrieve the value of a system call in a non blocking mode
by young_monk_love_perl (Novice) on Dec 06, 2013 at 09:21 UTC

    Sure, thank you taint I'm very interested by an example. Also are there some books you could recommend me about Perl ?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found