++AnomalousMonk for the link to the range operator. This is a good example of the perl philosphy of "Do what I mean" which really is "use context to understand what I really meant" as in perl many things work differently depending on context. The .. operator is often better understood in list context @array = 1..10; where it means "all the element from 1 to 10". The construct you have here keeps this "from", "to" meaning, except it makes no sense to generate a list of elements in a single test (scalar, or even more specifically boolean context). So the sense that has been chosen for this test to be true "from 1 to 2" is to compare $. with the values. 1..2 now means "from line 1 to line 2".
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>
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
Want more info? How to link or
or How to display code and escape characters
are good places to start.