#!/usr/bin/perl -w use strict; open ( SOMEFILE, '<', "$ARGV[0]" ) or die "Can't open $ARGV[0] for reading.\n"; while (defined($_ = )) { my @cbytes = split; my @hbytes = map(hex, @cbytes); my $hstring = pack('c*', @hbytes); } close SOMEFILE;