http://www.perlmonks.org?node_id=1013831


in reply to Re^2: Perl starter with questions about processing data from a txt file
in thread Perl starter with questions about processing data from a txt file

The code reports the remembered value when D > 1e-3, to the actual C value. As it is, it will report all the values. If you want to report only the first one, just exit the loop via last after printing a value. If you want to skip values that are on the neighbouring lines, just set a flag once you output a value, clear it otherwise, and only report a value if the flag is not set.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ