use strict; use warnings; use IO::File; # copy \n delimited file from Windows to # Samba share on Unix. Output is also # supposed to be delimited by \n my $par='c:/tmp/dev.cs'; my $file=new IO::File $par,'r' or die "$!"; my $data=join '',<$file>; # !!!! undef $file; my $_path_local='u:/transfer/devc.cs'; my $handle=IO::File->new($_path_local,'w') or die "$!"; $handle->binmode; print $handle $data; $handle->close;