Schrift
Board
-- This Board
--- This Thread
Wie installiert man ein Modul?
Startseite
Forum
Blog
Wiki
+
FAQ
/
IRC
Gästebuch
Start
·
Board
·
Anwendungen/Programme/Skripte in Perl
·
Allgemeines zu Perl
2024-11-28 20:29:03
Europe/Berlin
Einloggen
(
Registrieren
)
Einstellungen
Statistics
Jemand zu Hause?
0 Benutzer online
1 Gast
Start
Letzte 24h
/
7 Tage
Statistiken
suchen
Verhaltensrichtlinien
[thread]16480[/thread]
Hex compression
Tags:
perl5
hex
Ähnliche Threads
Leser: 19
Articles:
hide
open
all |
hide
show
old branches
+3 replies
Floreichy
2011-07-01 13:05
User since
2011-07-01
1 Artikel
BenutzerIn
Hi,
i want to compres a hex number like 0xF89a0010.
The Compression should decrease the number of chars in the hex string.
Has anyboby an idea how i could manage it?
Thanks
Last edited: 2011-07-01 13:26:57 +0200 (CEST)
rosti
2011-07-01 13:45
User since
2011-03-19
3476 Artikel
BenutzerIn
Use the pack()-Function:
Code (perl): (
dl
)
my
$bytes
=
pack
"N"
,
0xF89a0010
;
What you get: 4 Bytes in Network-Order (32-bit-integer, value see above).
--Rosti
pq
2011-07-01 13:57
User since
2003-08-04
12208 Artikel
Admin1
Hi,
englisch questions are welcome, but if you happen to speak german, that would be preferred =)
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen:
Wie frage ich
&
perlintro
brian's Leitfaden für jedes Perl-Problem
View
all threads created
2011-07-01 13:05
.