Hi All, I have a script as follows ---------------------------- my $host = shift; my $count = shift; my $result = `ping -c $count $host`; if($result =~ m/$count packets transmitted, $count packets received/) { $success = 1; } print "$result\n"; ----------------------------
Now, when I run the script, the ping is executed the result is stored in the $result variable and printed at the last statement. When the count is a big number, I have to wait till the command finishes and then it prints at one shot at the last line. Is it possible to get the output printed as it is seen while running the ping command? I mean instead of printing at one shot at the end, I want to print line by line as the ping is being executed. Is it possible? TIA Tapas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>