in reply to Re^6: Measuring the sound level (dB(A)) with PERL
in thread Measuring the sound level (dB(A)) with PERL

Ah. So the read() simply blocks until there actually is something to read and then continues.

Which indicates you can either remove the if-condition completely (since it does nothing) -or- replace it with something that acts on the return value (in case there is an actual i/o error).

  • Comment on Re^7: Measuring the sound level (dB(A)) with PERL

Replies are listed 'Best First'.
Re^8: Measuring the sound level (dB(A)) with PERL
by John-Robie (Novice) on Nov 11, 2016 at 14:05 UTC
    That's correct!