#! /usr/bin/perl -ln /^"Content-Type: .* charset=(.*)\\n"$/ and print $1