foreach my $file (@ARGV) { truncate $file, 0 or die "Failed to truncate $file: $!\n"; }