Rajeev Prasad wrote:
Hello John,
example from SS7 point codes:
input would be: 32 bit hex value like: 0x00FE3453
output expected is 24 bit value (format 8-8-8): 254-52-83
$ perl -le'
my $input = 0x00FE3453;
print join "-", map ord, ( split //, pack "N", $input )[ -3 .. -1 ];
'
254-52-83
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-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/