Acme-Buckaroo
view release on metacpan or search on metacpan
Buckaroo.pm view on Meta::CPAN
$in_string =~ s/\t+/\t/g;
my @in_array = split(/[\t]/, $in_string);
my $in_array_dump = Dumper(@in_array);
print("in_array_dump=>>$in_array_dump<<\n") if $debug_mode;
my @translate_array = ();
my $this_elem = "";
$counter = 1;
foreach $this_elem (@in_array)
{
if (!($this_elem)) { print("Found undefined elem, counter=$counter.\n"); $counter++; next; }
my $ascii_num = $xlate_2_hash{$this_elem} || 0;
my $to_char = pack("c", $ascii_num);
printf("Normalized >>%s<<, ascii_num=>>%s<<, char=>>%s<<, counter=>>%s<<\n", $this_elem, $ascii_num, $to_char, $counter) if $debug_mode;
push(@translate_array, $to_char);
$counter++;
}
my $outtext = join('', @translate_array);
print("Converted back to text=>>$outtext<<\n") if $debug_mode;
( run in 1.993 second using v1.01-cache-2.11-cpan-d80b1682f3f )