thunder wrote:
Hello all
I have the following small file that i am parsing one line at a time
(each line consists of hex values)
line 1: 0d
line 2:
line 3: 2000
line 4: 0064
line 5: 76d457ed462df78c7cfde9f9e33724c6
line 6: bded7a7b9f6d763e
line 7: 0059010081bb300597603b6f90ef4421
l
Hi,
The following could help you :
open (FILE, "input_test\.txt");
while (){
s/^\s*|\s*$//g;
my @chars=split //;
my @chunks=();
while ( @chars ){
push @chunks,join '', splice @chars,0,8;
}
print jo
Hello all
I have the following small file that i am parsing one line at a time
(each line consists of hex values)
line 1: 0d
line 2:
line 3: 2000
line 4: 0064
line 5: 76d457ed462df78c7cfde9f9e33724c6
line 6: bded7a7b9f6d763e
line 7: 0059010081bb300597603b6f90ef4421
line 8: 0016084277