use File::Copy qw(copy); use IO::File; package Mods::Debug; [...stuff...] copy($file1, $file2);