Thank you!

On 9/23/08 3:10 PM, "John W. Krahn" <[EMAIL PROTECTED]> wrote:

Stephen Reese wrote:
> [snip]
>> #next unless /IPACCESSLOGP: list $acl denied ([tcpud]+)
>> ([0-9.]+)\([0-9]+\)\s*->\s*([0-9.]+)\(([0-9]+)\), ([0-9]+) \;
>>
> next unless /IPACCESSLOGP: list $acl denied ([tcpud]+) ([0-9.]+)\
> ([0-9]+\)\s*->\s*([0-9.]+)\(([0-9]+)\), ([0-9]+) /;
>
> Thanks Ron that worked. What is the 'next' statement actually doing though
> since the script works with or without it? Is it more efficient? I looked
> here http://www.perl.com/doc/FMTEYEWTK/style/slide29.html and
> http://www.perl.com/lpt/a/490. Is the 'next' statement skipping lines that
> match the 'if' statement?
>
> Should the 'if' statement be modified to reflect the 'next' statement
> (basically modifying the $quad and $port to remove the $foo and $moo)?

In your original post you presented *two* *separate* scripts and I
commented on both scripts, and now you are combining parts of both
scripts which is why you seem to be confused.

Hint: The "next unless //;" was a replacement for the "if (//) {}" block.




John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/



Reply via email to