#!/usr/bin/perl -w use strict; use Math::BigInt; #BigInt KiloByte Unit my $KB = Math::BigInt ( "1024" ); #BigInt MegaByte Unit my $MB = Math::BigInt ( $KB->bmul( $KB ) ); #BigInt GigaByte Unit my $GB = Math::BigInt ( $MB->bmul( $KB ) ); my $arg1 = Math::BigInt->new( shift ); # arg1 is in GBs my $GBarg1 = Math::BigInt->new( $arg1->bmul( $GB ) ); my $arg2 = Math::BigInt->new( shift ); # arg2 is in MBs my $MBarg2 = Math::BigInt->new( $arg2->bmul( $MB ) ); # why rc is 0? my $rc = $GBarg1->bdiv( $MBarg2 ); print "rc is [$rc]\n";