VOOZH about

URL: https://www.geeksforgeeks.org/perl/perl-mathbigint-from_hex-method/

⇱ Perl | Math::BigInt->from_hex() method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Perl | Math::BigInt->from_hex() method

Last Updated : 9 Jun, 2021

Math::BigInt module in Perl provides objects that represent integers with arbitrary precision and overloaded arithmetical operators.
from_hex() method of Math::BigInt module is used to convert the hexadecimal number passed as input to its corresponding decimal number.
 

Syntax: Math::BigInt->from_hex()
Parameter: input hexadecimal number to be converted
Returns: a corresponding decimal number of the passed hexadecimal number


Example 1: 
 


Output: 
1000
55130

 

Example 2: 
 


Output: 
-1000
-55130

 
Comment
Article Tags:

Explore