Number::Compare(3pm) User Contributed Perl Documentation Number::Compare(3pm)NAME
Number::Compare - numeric comparisons
SYNOPSIS
Number::Compare->new(">1Ki")->test(1025); # 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 ("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
METHODS
->new( $test )
Returns a new object that compares the specified test.
->test( $value )
A longhanded version of $compare->( $value ). Predates blessed subroutine reference implementation.
->parse_to_perl( $test )
Returns a perl code fragment equivalent to the test.
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
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.
SEE ALSO
http://physics.nist.gov/cuu/Units/binary.html
perl v5.12.4 2011-09-21 Number::Compare(3pm)
Check Out this Related Man Page
Number::Compare(3) User Contributed Perl Documentation Number::Compare(3)NAME
Number::Compare - numeric comparisons
SYNOPSIS
Number::Compare->new(">1Ki")->test(1025); # 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 ("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
METHODS
->new( $test )
Returns a new object that compares the specified test.
->test( $value )
A longhanded version of $compare->( $value ). Predates blessed subroutine reference implementation.
->parse_to_perl( $test )
Returns a perl code fragment equivalent to the test.
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
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.
SEE ALSO
http://physics.nist.gov/cuu/Units/binary.html
perl v5.18.2 2011-09-21 Number::Compare(3)
Hi,
I'm a unix newbie and need your help.
I need to get a count of files on our server. Number of .html files, Number of .pdf's, and Number of .ppt.
I tried:
find . -type f | wc -l
but it only give me a total count.
Thanks. (5 Replies)
Is there any way to compare two strings for a greater or less than condition? For example, StringA is "apple" and StringB is "bonnet" and StringC is "captain". Can I only test for equal/not-equal, or is there a way to find out whether StringA is less than StringB, and StringC is greater than... (6 Replies)
Compare two files, search for data from position 1-6 if both matches then i need to extract those records only from file A
cat File A
A37985LUNGIUF7845049530113
F41604CHACAMA286000004371
cat File B
C26344
F41604
o/p
F41604CHACAMA286000004371 (8 Replies)
Hi,
my first post here!
Description of my problem:
I have one txt-file with six rows and each row contains seven numbers seperated with whitespaces.
I want to:
Compare one array with seven numbers with each row of numbers in the txt-file.
I have managed to compare one array with... (6 Replies)
Hi
have an array like this
colarray="a"
colarray="b"
colarray="c"
colarray="d"
colarray="e"
colarray="f"
the arrayvariable is in unix sh file
i want to check the content of the array to oracle database table.
that is whether "a" is present in the table. (4 Replies)
Hello , I want to Compare with 2 strings and get if they are True or not
please would like some help on this
#!bin/ksh
echo "Enter Name 1"
read Name1
echo "Enter Name 2"
read Name2
echo "------------------------"
echo "First Name: $Name1"
echo "Second Name: $Name2"
echo... (25 Replies)
witam
potrzebuje polecenia porownujacego koumny na podstawie n-ostatnich znakow danej linnijki tj
mam 2 koumny AiB zawierajace ciag dowolnych znakow (dlugosci w kazdej linijce mga byc rozne wiec uzycie substra odpada)
A B
ewewewabc nbgujnnabc... (3 Replies)
Hi guys
I am having this strange issue.Well my requirement is like below
Compare two values between flat file and oracle DB
Via perl script I am easily getting the rowcount
Now I connect sql plus via perl and the column value that returns is string
my $sqlplus_settings = '';
my... (7 Replies)
Hello,
I am having output shown below names will change and can show different result and i want to compare with the checklist this file will not change it is standard settings.
If there is some discrepancy than the complete line of output should be shown with name.
I tried to use below... (10 Replies)
Hi
requirement : I have file a and b. need to compare both are matching.
FIle a
----
/ct/mr/test/bin/b
/ct/mr/test/bin/CheckEmpty
/ct/mr/test/bin/ChkFile2
File b
---
/ct/mr/test/bin/CheckEmpty
/ct/mr/test/bin/ChkFile2
/ct/mr/test/bin/b
Eventhough content is same it is in... (3 Replies)
I had to vent somewhere where people would understand.
The site is still driving me mad. I'm at McMurdo Station, Antarctica, and the satellite bandwidth is generally fairly adequate. I actually completed the application Nov 4th in just under 3 hours I believe. But I removed it thinking it was... (7 Replies)
Dear Gents,
Please can you help me.
I have a file with multiple values called ID
ID ( columns 11-24)
INDEX ( column 26 )
STATUS ( columns 91-92)
The ID can be repetead many times to diference each one there is a value called INDEX which difference each time, it increase if the ID is... (10 Replies)
Hi All,
I need to compare a record in one file and find the matching across two file.
This is the master file. File name : CUST.dat
CUST_ID
9998
10000
10004
10005
DATAFILE1
9998;80000091;4;687582837443;;;;;;;;;
9998;80000091;4;687582841003;;;;;;;;;... (4 Replies)