#!/usr/bin/env perl use strict; use warnings; use File::Copy; copy('infile.txt', 'outfile.txt') or die("Ooops, i messed up: $!");