Perl | Math::BigInt->brsft() method
Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators.
brsft() method of Math::BigInt module is used to right shift the given value by a base given as parameter.
$y- number of times shifting is to be done
$n- base of shifting
Returns: a result by dividing the number by the base by given number of times
Note: By default it takes 2 as a base.
There is an exception with the negative value and that is only with the base 2, the output will be the difference between the actual output and the original number. Following example will make it clear: