develooper Front page | perl.beginners | Postings from March 2012

RE: work with hexadecimal values

Thread Previous | Thread Next
From:
Sunita.Pradhan
Date:
March 8, 2012 08:45
Subject:
RE: work with hexadecimal values
Message ID:
3A046B8D0B71BD4790EA3FB35CF40CE1152E9578FE@MX34A.corp.emc.com
Sorry , I mean how will I get all those hexadecimal numbers in a array? 


-Sunita

-----Original Message-----
From: Sunita.Pradhan@emc.com [mailto:Sunita.Pradhan@emc.com] 
Sent: Thursday, March 08, 2012 9:48 PM
To: jwkrahn@shaw.ca; beginners@perl.org
Subject: RE: work with hexadecimal values

Thanks John . How can I collect all devices in a array ?

-Sunita

-----Original Message-----
From: John W. Krahn [mailto:jwkrahn@shaw.ca] 
Sent: Thursday, March 08, 2012 7:11 PM
To: Perl Beginners
Subject: Re: work with hexadecimal values

Sunita.Pradhan@emc.com wrote:
> Hi

Hello,

> I have one range of hexadecimal numbers like : 415A till 415F .
> I need to find all other numbers between this 2 . Is there any Perl
> function which will help to find all numbers or any other way in Perl ?

$ perl -e'printf "%X\n", $_ for hex( "415A" ) .. hex( "415F" )'
415A
415B
415C
415D
415E
415F



John
-- 
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction.                   -- Albert Einstein

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/




-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About