in reply to Re: Re: copy to different directory
in thread copy to different directory
Also, IO::All->slurp does not respect binmode and so will clobber any binary files copied that way, at least under Win32 and also under newer versions of Perl that have that weird Unicode stuff (see also RT ticket #5686, thanks to PodMaster):
#!/usr/bin/perl -w use strict; use File::Temp qw(tempfile); use Test::More tests => 2; use_ok( 'IO::All' ); my ($fh,$filename) = tempfile(); my $binary = "foo\r\nbar"; binmode $fh; print $fh $binary; close $fh; my $content = io($filename)->slurp; is($binary, $content);
|
|---|