Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) One-way passwd-style encryptionFind a substring within a string (Berikutnya)
Functions for SCALARs or strings

Convert a string to a hexadecimal number

Daftar Isi

  • hex EXPR

  • hex

    Interprets EXPR as a hex string and returns the corresponding value.(To convert strings that might start with either 0, 0x, or 0b, seeoct.) If EXPR is omitted, uses $_.

    1. print hex '0xAf'; # prints '175'
    2. print hex 'aF'; # same

    Hex strings may only represent integers. Strings that would causeinteger overflow trigger a warning. Leading whitespace is not stripped,unlike oct(). To present something as hex, look into printf,sprintf, and unpack.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) One-way passwd-style encryptionFind a substring within a string (Berikutnya)