File: bin_to_values.pl

package info (click to toggle)
entropybroker 2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,600 kB
  • sloc: cpp: 14,386; sh: 934; makefile: 188; java: 148; perl: 12
file content (19 lines) | stat: -rwxr-xr-x 257 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/perl -w

# $Revision$

open(FILE, "<" . $ARGV[0]) or die 'Cannot open file '.$ARGV[0];
binmode(FILE); 

$buffer = '';
while(!eof(FILE))
{
	read(FILE, $buffer, 4096);

	foreach(split(//, $buffer))
	{
		printf("%d\n", ord($_));
	}
}

close(FILE);