On Mon, 28 Jul 2014 18:59:47 -0400
ESChamp <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to