Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i want to modify this file using perl script as followsuse Cwd; .. .. #Now process Config file<br> open(CFG_READ, "< txt52_mm.org") || die "Couldn't open tmp con +fig command file for reading"; open(CFG, "> txt52_mm.cfg") || die "Couldn't open config file +for writing"; ... ... ... ... ... open(ASM_READ, "< t52${fl}a.org") || die "Couldn't open tmp"; open(ASM, "> t52${fl}a.asm") || die "Couldn't open file for wr +iting "; #######################################################
use Cwd; $execdir = $ENV{EXECDIR}; #Now process Config file open(CFG_READ, "< txt52_mm.org") || die "Couldn't open tmp con +fig command file for reading"; open(CFG, "> $execdir/txt52_mm.cfg") || die "Couldn't open config file + for writing"; ... ... ... ... ... open(ASM_READ, "< t52${fl}a.org") || die "Couldn't open tmp"; open(ASM, "> $execdir/t52${fl}a.asm") || die "Couldn't open fi +le for writing ";
Edit by BazB. Added code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: add a line or string in complex perl file
by rev_1318 (Chaplain) on Mar 16, 2005 at 11:30 UTC | |
|
Re: add a line or string in complex perl file
by perlsen (Chaplain) on Mar 16, 2005 at 10:11 UTC |