I'm not sure what it is you're trying to do. If you posted a bit of what you'd like you output to be, maybe that would help. In the meantime try this snippet of code. It ignores everything until the first line of asterisks. It also supresses printing of the lines of asterisks themselves as well.
my $line; # start out ignoring/suppressing all output my $show = 0; # your code to open XACLS goes here while (defined($line = <XACLS>)) { # this bit ignores lines of stars # it also turns on output when it "sees (8) stars" if ($line =~ /^\*{8}/) { $show = 1; next; } # note: you could also turn $show on and off to # ignore entire sections, if that's what you need. # just stick the appropriate variation of the # above if-statement and have it turn $show on/off # as needed. # you can suppress other types of lines by adding # more tests, like this ... if ($line =~ /^No Auditing/) { next; } # only print if the $show flag is 1 if ($show) { print $line; } } # close XACLS here
I'm just not sure what it is you're after.

In reply to Re: PERL newbie Cant figure out where to start by MonkE
in thread PERL newbie Cant figure out where to start by jwashburn

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.