On Mon, 28 Jul 2014 18:59:47 -0400
ESChamp <esch...@gmail.com> wrote:

> # Tie it to an array
> #
> (my $copy = $htmfile) =~ s/(\.htm)\z/-Copy$1/i;

# the substitution will fail if the HTML file
# doesn't have the correct extension
die "invalid extension on $htmlfile\n" if $copy eq $htmlfile;

> copy $htmfile, $copy;

# always check for error
copy $htmfile, $copy or die "could not copy $htmlfile\n";


-- 
Don't stop where the ink does.
        Shawn

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to