in reply to a little OT - smbfs weirdness
AFAIK Samba doesn't do any conversion on line-endings. You're probably looking at a \r\n <-> \n conversion problem. As you (should) know Dos and NT use \r\n as end-of-line and Unix uses just \n.
Maybe you could use something like this (I never tried it though):
$/ = "\r\n"; while(<FILE>) { chomp; blabla; }
If this doesn't work you may want to open the file throug a dos2unix pipe:
open FILE, "dos2unix $file|" or die;
|
|---|