Number::Compare - numeric comparisons
Number::Compare->new(">1Ki")->test(1025); # is 1025 > 1024
my $c = Number::Compare->new(">1M"); $c->(1_200_000); # slightly terser invocation
Now this would be very pointless, if Number::Compare didn't understand magnitudes.
The target value may use magnitudes of kilobytes ("k", "ki"), megabytes ("m", "mi"), or gigabytes ("g", "gi"). Those suffixed with an "i" use the appropriate 2**n version in accordance with the IEC standard: http://physics.nist.gov/cuu/Units/binary.html
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |