- or download this
sub binary_array_to_uint {
my $bin = join '', @_;
return oct "0b$bin";
}
- or download this
perl -wlane 'print oct( "0b" . join( "", @F ) );' <<END
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
END
- or download this
Output:
2147483648
...
2147483649
1
0