http://www.perlmonks.org?node_id=155257


in reply to removing carriage returns

also (it's easier to understand, but you adding more code), just an alternative...
while ($requests = <REQUESTS>) { chomp $requests; #remove any endline characters if ($requests ne "") { #if all endline characters are wiped, check f +or nothingness print MAIL "$requests\n"; } }
EDIT. RMGir got me good. Sorry for the mistake. (didn't put my newlines back in)