I have a C program that constantly returned the % of the job completed to my Perl script so to execute this program I have these lines:
Expand|Select|Wrap|Line Numbers
- use IO::Handle;
- $| = 1;
- $data1 = "./myC.exe 10 10 1 abc";
- open PS, "$data1 |";
- PS->autoflush(1);
- while ($line = readline(*PS)) {
- print $line;
- print "\n";
- }
Expand|Select|Wrap|Line Numbers
- use IO::Handle;
- $| = 1;
- $data1 = "./myC.exe 10 10 1 abc";
- open PS, "$data1 |";
- PS->autoflush(1);
- while (<PS>) {
- print;
- print "\n";
- }
Thanks in advance.