#!/bin/sh
# -*- perl -*-
# This code allows us to start perl from our path or an environment variable
# rather than hardcoding a path into the #! line.  It works from sh or csh.
(exit $?0) && eval 'exec ${QPERLQ-perl} -x $0 ${1+"$@"}'
if (! $?QPERLQ) setenv QPERLQ perl
exec $QPERLQ -x $0 $argv:q

#!/usr/local/bin/perl -w
#
# $Id: clean_mime,v 1.3 1997/12/23 17:29:13 ejb Exp $
# $Source: /home/ejb/scripts/RCS/clean_mime,v $
# $Author: ejb $
#
# Undo the special mime quoting for 8-bit characters common in mail messages.
#

require 5.002;
use strict;

my $whoami = ($0 =~ m,([^/\\]*)$,) ? $1 : $0;
#my $dirname = ($0 =~ m,(.*)[/\\][^/\\]+$,) ? $1 : ".";

my $result = "";

while (<>)
{
    s/=\n//;
    s/=([\da-fA-F]{2})/chr(oct("0x" . $1))/eg;
    $result .= $_;
}
print $result;
