in reply to Re: Re: finding different linebreaks with <>
in thread finding different linebreaks with <>

Nope, no regexes for $/. If the file isn't too large or performance isn't too critical, you could do something like (untested, and requires 5.8.0):
open my $fh, "filename" or die $!; while (my $line = <$fh>) { local $/ = "\r"; open my $fh, "<", \$line or die $!; while (my $line = <$fh>) { # process $line here } }
Otherwise, open the file and read a bunch of characters (e.g. by setting $/=\1024; see perldoc perlvar) and check for \n or \r (e.g. with $/ = $1 if $buffer=~/([\r\n])/;)and set $/ appropriately; then seek to the beginning of the file and start the read loop.