Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: OS command execution

by Massyn (Hermit)
on Oct 14, 2002 at 07:26 UTC ( [id://204992]=note: print w/replies, xml ) Need Help??


in reply to OS command execution

Found the solution!
#!/usr/local/bin/perl my $cmd = "runme.bat"; open (DATA,"$cmd |"); while (my $line = <DATA>) { print "got $line"; } close (DATA);

Replies are listed 'Best First'.
Re: Re: OS command execution
by fsn (Friar) on Oct 14, 2002 at 16:06 UTC
    You might also wan't to set unbuffered output to get data when it's sent, and not when the buffer is full. Try setting $| = 1.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-23 17:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found