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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|