Thread Datei als HEX einlesen? (1 answers)
Opened by Gast at 2007-07-08 03:06

shigetsu
 2007-07-08 04:49
#78307 #78307
User since
2007-04-22
16 Artikel
BenutzerIn
[Homepage] [default_avatar]
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl -l

use strict;
use warnings;

{
    my $hex = join ' ', map { unpack 'h*', $_ } do { local $/; split //, <DATA> };
    print $hex;
}

__DATA__
The Theory of Groups is a branch of mathematics in which one does 
something to something and then compares the result with the result 
obtained from doing the same thing to something else, or something 
else to the same thing. -- Newman, James R.

Code: (dl )
45 86 56 02 45 86 56 f6 27 97 02 f6 66 02 74 27 f6 57 07 37 02 96 37 02 16 02 26 27 16 e6 36 86 02 f6 66 02 d6 16 47 86 56 d6 16 47 96 36 37 02 96 e6 02 77 86 96 36 86 02 f6 e6 56 02 46 f6 56 37 02 a0 37 f6 d6 56 47 86 96 e6 76 02 47 f6 02 37 f6 d6 56 47 86 96 e6 76 02 16 e6 46 02 47 86 56 e6 02 36 f6 d6 07 16 27 56 37 02 47 86 56 02 27 56 37 57 c6 47 02 77 96 47 86 02 47 86 56 02 27 56 37 57 c6 47 02 a0 f6 26 47 16 96 e6 56 46 02 66 27 f6 d6 02 46 f6 96 e6 76 02 47 86 56 02 37 16 d6 56 02 47 86 96 e6 76 02 47 f6 02 37 f6 d6 56 47 86 96 e6 76 02 56 c6 37 56 c2 02 f6 27 02 37 f6 d6 56 47 86 96 e6 76 02 a0 56 c6 37 56 02 47 f6 02 47 86 56 02 37 16 d6 56 02 47 86 96 e6 76 e2 02 d2 d2 02 e4 56 77 d6 16 e6 c2 02 a4 16 d6 56 37 02 25 e2 a0

View full thread Datei als HEX einlesen?