in reply to use strict and -w
while (<FILE>) { chomp; $_ .= '-- '; my ($quote,$person) = split /--/, $_, 2; $quote =~ s/^\s+|\s+$//g; $person =~ s/^\s+|\s+$//g; print "$quote\t$person\n"; } [download]