man Number::Compare () - numeric comparisons

NAME

Number::Compare - numeric comparisons

SYNOPSIS

 Number::Compare->new(">1Ki")->test(1); # is 1025 > 1024

 my $c = Number::Compare->new(">1M");
 $c->(1_200_000);                          # slightly terser invocation

DESCRIPTION

Number::Compare compiles a simple comparison to an anonymous subroutine, which you can call with a value to be tested again.

Now this would be very pointless, if Number::Compare didn't understand magnitudes.

The target value may use magnitudes of kilobytes (CWk, CWki), megabytes (CWm, CWmi), or gigabytes (CWg, CWgi). Those suffixed with an CWi use the appropriate 2**n version in accordance with the IEC standard: http://physics.nist.gov/cuu/Units/binary.html

METHODS

Returns a new object that compares the specified test. A longhanded version of CW$compare->( CW$value ). Predates blessed subroutine reference implementation. Returns a perl code fragment equivalent to the test.

AUTHOR

Richard Clamp <richardc@unixbeard.net>

COPYRIGHT

Copyright (C) 2002 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

http://physics.nist.gov/cuu/Units/binary.html