So, now I've changed things alittle, and re-defined my format.
system {
host steve-1;
domain-search myhost.com myhost.net;
time/zone Here/There;
auth-order my password;
root-auth {
# enc-pwd "NOWAY"; #YOU CANT HAVE THIS
}
server {
1.2.3.4;
5.6.7.8;
}
should look like:
system host steve-1;
system domain-search myhost.com myhost.net;
system time/zone Here/There;
system auth-order my password;
.......blah, blah,blah
here's what I've got:
}
while (<>); {
if (/^system/) {
@prepend = "system";
Now, what I'm trying to do is read between "{" and "}",
prepend "system" and whitespace to each line.
That is a rule that will apply to the entire config file.
Anyone care to help a newbie out?
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.