qpc

Quoted-printable converter using Perl
Sometimes when reading raw mail in the shell I come across Quoted-printables. If left encoded it is really annoying to read. Perl offers a simple solution on the fly. This is my qpc script I use in such cases:
#!/usr/bin/perl

use strict;
use warnings;

use MIME::QuotedPrint;

if (@ARGV < 1) {
	print STDERR "usage: qpc [-de]\n";
	exit(1);
}

my $opt = shift @ARGV;

if ($opt eq "-d") {
	print decode_qp($_) while(<>);
} elsif ($opt eq "-e") {
	print encode_qp($_) while (<>);
} else {
	print STDERR "usage: qpc [-de]\n";
	exit(1);
}