Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Binary-to-text converter (See related posts)

Converts all 8-bit binary numbers in the standard input into text, though there's probably a better way to do this
#!/usr/bin/perl -wn
use strict;
s/\s//g;
print chr oct "0b$1" while /([01]{8})/g;
print "\n";

You need to create an account or log in to post comments to this site.


Click here to browse all 4858 code snippets

Related Posts