my @eol = ("\n","\t","\r"); # etc, etc while() { local $/ = shift @eol; my $line = ; }