in reply to (OT) Fixing Line Endings
This is another situation where the -w command line switch beats use warnings; ;-)
#!/usr/bin/perl -w\r ... [download]
just works ™