What do you mean by
dubplicate and
change?
Well, here's a generic response, though the more info as to what you're doing the better replies you can get (and the monks here can be really helpful).
You could open the file, and (if its not to big) slurp it into an array, then to some changes based on your needs then save the array to a file (possibly use tie?).
You could use File::Copy to copy the file, open in (with perl/by hand?) to do some editing.
#some code to show what I was talking about ...
$file = 'your/path/or/is\it\this\way';
# open and slurp in
open(FH,$file) or die "make a helpful die statement here";
@lines_of_file = <FH>;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.