GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Number::Compare(3) User Contributed Perl Documentation Number::Compare(3)

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

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 ("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

Returns a new object that compares the specified test.

A longhanded version of $compare->( $value ). Predates blessed subroutine reference implementation.

Returns a perl code fragment equivalent to the test.

Richard Clamp <richardc@unixbeard.net>

Copyright (C) 2002,2011 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.

http://physics.nist.gov/cuu/Units/binary.html
2011-09-21 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.