use strict; use warnings; sub scrub_text { return if /^\x89PNG/ || /^PK\x03\x04/; s/opensesame/xxxxxxxxxx/g; s/hunter2/xxxxxxx/g; } sub keep_file { !m%^secret-directory/% && !m%settings\.ini$% } 1;