Maybe the answers in I just want IF, OR, OR not every one or if elsif elsif prints all three. can help you?

At least show the courtesy to link to your older nodes if you're going to make a new toplevel node about the same problem. You could also spend some more time at explaining what you want your program to do. In separate, short but still coherent sentences. Maybe. Instead. Of using. Punctuation where. *** It does not make. Sense.

Also, providing some sample input and output makes it easier for us to see where your problem is. Also, maybe even provide the output you want as well - this gives us even more to work with.

As to your problem, I don't understand what you're trying to do. But the following line makes no sense:

($line =~ m/'syslogd'\)/);

What is this line supposed to do? Why is it in your program?

Looking further, the whole block makes no sense to me:

} else { ($line =~ m/'syslogd'\)/); my $newline = $. + 3; $newline = $bgs; print OUT $newline; next; }

What is it supposed to do? How does it differ from the following?

print OUT $bgs; next;

In reply to Re: if or die! by Corion
in thread if or die! by wcj75019

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.