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

Hexadecimal-to-text converter (See related posts)

This script converts all 2-digit hexadecimal numbers (without 0x's) in the standard input into text, though there's probably a better way to do this.
   1  
   2  #!/usr/bin/perl -wn
   3  use strict;
   4  s/\s//g;
   5  print chr hex $1 while /([[:xdigit:]]{2})/g;
   6  print "\n";

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


Click here to browse all 5355 code snippets

Related Posts