> foreach my $line (@body) { > $_ = $line; > s/^(?:>|\s)*(.*)$/$1/g; > print; > } > > Any ideas what I am doing wrong here[3]
Works from here. Also you'll probably want to localise $_ and forget about re-appending the rest of the message e.g s{ ^ (?: \s* >? \s* )* }()x Which just strips off the offending characters. Dan->nick() eq 'broquaint'