while () { chomp; my @f = split /--/; s/^\s+|\s+$//g for @f; local $"="\t"; print "@f\n"; }