Dear Gurus
I need help in generating the variable substitutions ...by a perl script..
I have a main file with variable tokens like this:
name: File1
===========
Destination/Company=@deploy.company@
Destination/Environment=@deploy.env@
Destination/Location=@deploy.location@
Destination/Domain=@deploy.location@
MIG_GatewayAddresses=@deploy.gwaddress@
MIG_URL=@deploy.mig_url@
Database/URL=@deploy.db_url@
SBU/Domain=@deploy.company@_@deploy.location@
I have another file that provides the variable values...
name: File2
============
deploy.company=ABC
deploy.location=BLore
deploy.env=DEV
deploy.gwaddress=fnet-ayz3z1:18997;fnetzyx3z1:18997
deploy.mig_url=tibjmsnaming\://ldgcomp.abz.net\:25011,tibjmsnaming\://
+ldgcomp.abz.net\:25012
deploy.db_url=jdbc:antsoftware:oracle://ldgcomp.abz.net:1521;SID=devd;
+enablecanceltimeout=true
I would like these values to be replaced with in the main file. I have been trying by best but couldnt reach a solution yet. Now I've almost there to sumit my assignment...can you please help? Many thanks in advance...
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.