#!/usr/bin/perl -w
use strict;

my $head = undef;
my $body = "";

while (<>) {
    chomp;
    next if (m/^\s*$/);

    if (m/^>/) {
	&something($head, $body) if ($body);
	$body = "";
	$head = $_;
	$head =~ s/\t/ /g;
    } else {
	$body .= $_;
    }
}
&something($head, $body);

sub something {
    my $head = shift;
    my $body = shift;
    print "$head\t$body\n";
}
