Is there are way for a while loop to continue to loop even though there is no data being passed to the handle?
Any help would be greatly appreciated! Thanks! Mattopen(TAIL, "tail --follow=name logfile.log|") or die "TAIL : $!"; while (<TAIL>) { print "matt: $_\n"; sleep(1); # # Should print "matt" once every second regardless if tail is +providing data or not }
In reply to Piping Tail and while loops by matt.schnarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |