#!/usr/bin/perl use strict; use warnings; use autodie; my $OLDFILE = '02190.JPG'; my $NEWFILE = 'img/09911.JPG'; open my $fh, '<', $OLDFILE; binmode $fh; my $data = join '', <$fh>; close $fh; open $fh, '>', $NEWFILE; binmode $fh; print $fh $data; close $fh; print "Copied $OLDFILE to $NEWFILE\n";