$/="\'\n"; while () { chomp; s/\?\'/\'/g; my $i; print "[",$i++,"] $_\n" for split /\+/; }