in reply to Re: Text::CSV_XS and line-endings
in thread Text::CSV_XS and line-endings
In addition to the problems pointed out by others (need the OS on which a file was created not the OS on the current machine), you shouldn't rely on $ENV{OS}, even if it happens to be in your environment. It's not set automatically by perl, and doesn't seem to be set in Gentoo Linux, RedHat Linux, OS X, or Solaris. You should use $^O (equivalent to $Config{osname}).
perl v5.8.7 i386-linux $Config{osname}=$^O=linux $ +ENV{OS}= perl v5.8.4 i686-linux-thread-multi $Config{osname}=$^O=linux $ +ENV{OS}= perl v5.8.7 i686-linux $Config{osname}=$^O=linux $ +ENV{OS}= perl 5.005_03 sun4-solaris $Config{osname}=$^O=solaris $ +ENV{OS}= perl v5.8.6 darwin-thread-multi-2level $Config{osname}=$^O=darwin $ +ENV{OS}=
|
|---|