Line endings should only be an issue in I/O. By default perl strings use a single newline character as a record separator. PerlIO translates between this and whatever your OS requires. When processing files from another OS, specify the required translation on the open statement.
...or use File::Edit::Portable which does the translations automatically for you, cross-platform, so you don't have to figure out which ending to use yourself ;)
use File::Edit::Portable;
my $rw = File::Edit::Portable->new;
my $fh = $rw->read('file.txt');