I am developing an application that produces a streaming binary data (using Linux command Should Linux commands be used to make such print slower? How do I manage this kind of print? A small pearl script: rtmpdump To STDOUT) During this download, for debugging purpose, I would like to change this type of stream download with STDOUT slow printing of the local file, so I know that the data will be processed.
cat file.bin is simple, but compared to stream downloads it is very fast when I used
cat instead of the project I am working with data in small wholesale sizes, real streams, downloads and processes compared with that.
Use warnings; Strict use; Open your $ F, "& lt;", "file.bin" or die ($!); Binmode ($ f); My $ buff; While (my $ len = read ($ f, $ buf, 100 * rand (+ + 10)) {print $ buf; Sleep Rand () * 2; } $ F;
No comments:
Post a Comment