Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl open(fil,"file.txt"); @file = <fil>; close(fil); $converted=""; foreach(@file) { (@chrs) = split("",$_); foreach $chr(@chrs) { my $asciiChar = ord($chr); ###########DO Hex Stuff HERE########## $hexChr $converted = join("",$converted,$hexChr); } } open(outp, ">output.txt"); print outp $converted; close(outp);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Converting ASCII to Hex
by merlyn (Sage) on Jul 21, 2005 at 01:01 UTC | |
by freonpsandoz (Beadle) on Jun 11, 2017 at 00:25 UTC | |
by hippo (Archbishop) on Jun 11, 2017 at 11:42 UTC | |
by Anonymous Monk on Jul 21, 2005 at 01:08 UTC | |
by polettix (Vicar) on Jul 21, 2005 at 01:48 UTC | |
by friedo (Prior) on Jul 21, 2005 at 01:41 UTC | |
by fishbot_v2 (Chaplain) on Jul 21, 2005 at 01:50 UTC | |
by kwaping (Priest) on Jul 21, 2005 at 02:01 UTC | |
|
Re: Converting ASCII to Hex
by zentara (Cardinal) on Jul 21, 2005 at 11:37 UTC | |
|
Re: Converting ASCII to Hex
by graff (Chancellor) on Jul 22, 2005 at 04:05 UTC |