Advertisement
hakonhagland

encode

Feb 18th, 2021
1,881
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.45 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3. use feature qw(say);
  4. use utf8;
  5. use File::Temp qw(tempdir);
  6. use File::Copy::Recursive qw(dircopy);
  7.  
  8. my $dir = tempdir( CLEANUP => 1 );
  9. chdir $dir;
  10. my $source_dir = 'dir1';
  11. my $dest_dir = 'dir2';
  12. my $fn = 'Funkstörung';
  13. printf "%vX\n", $fn;  # Unicode charcter codes
  14. system 'mkdir', $source_dir;
  15. system 'touch', "$source_dir/$fn";
  16. dircopy($source_dir, $dest_dir) or die "dircopy failed: $!";
  17. system 'ls', $dest_dir;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement