<head>
        <title></title>
</head>
<body>
<div class="userStyles" style=" font-family: Arial; font-size: 12pt; color: #000000;">Thank you for the tip.
<footer class="signatureContainer" style="display:inline;"> </footer>

<footer class="replyforwardcontainer"><br>
<br>
<span>On Sun, 24 Dec 2023 21:02:26 -0800, Adriano Ferreira <a.r.ferreira@gmail.com> wrote:</span><br>
 
<div dir="ltr"> 
<div>"perldoc" has the answer, just like mentioned by Andy and David. And "perldoc" has a special trick when you want to look up a special variable.</div>

<div> </div>

<div><font face="monospace">    perldoc -v PerlVar</font></div>

<div> </div>

<div>In the case of $.:</div>

<div> </div>

<div><font face="monospace">% perldoc -v '$.'<br>
    HANDLE->input_line_number( EXPR )<br>
    $INPUT_LINE_NUMBER<br>
    $NR<br>
    $.      Current line number for the last filehandle accessed.<br>
<br>
            Each filehandle in Perl counts the number of lines that have<br>
            been read from it. (Depending on the value of $/, Perl's idea of<br>
            what constitutes a line may not match yours.) When a line is<br>
            read from a filehandle (via "readline()" or "<>"), or when<br>
            "tell()" or "seek()" is called on it, $. becomes an alias to the<br>
            line counter for that filehandle.<br>
<br>
            You can adjust the counter by assigning to $., but this will not<br>
            actually move the seek pointer. *Localizing $. will not localize<br>
            the filehandle's line count*. Instead, it will localize perl's<br>
            notion of which filehandle $. is currently aliased to.<br>
<br>
            $. is reset when the filehandle is closed, but not when an open<br>
            filehandle is reopened without an intervening "close()". For<br>
            more details, see "I/O Operators" in perlop. Because "<>" never<br>
            does an explicit close, line numbers increase across "ARGV"<br>
            files (but see examples in "eof" in perlfunc).<br>
<br>
            You can also use "HANDLE->input_line_number(EXPR)" to access the<br>
            line counter for a given filehandle without having to worry<br>
            about which handle you last accessed.<br>
<br>
            Mnemonic: many programs use "." to mean the current line number.</font></div>

<div> </div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Sat, Dec 23, 2023 at 9:47 PM David Mertens <<a href="mailto:dcmertens.perl@gmail.com">dcmertens.perl@gmail.com</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="auto">When in doubt,
<div dir="auto"> </div>

<div dir="auto">perldoc perlvar</div>

<div dir="auto"> </div>

<div dir="auto">Might give you a faster answer than asking the list. Ymmv. :-)</div>
</div>
 

<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Sat, Dec 23, 2023, 5:02 PM Richard Reina <<a href="mailto:richard@rushlogistics.com" target="_blank">richard@rushlogistics.com</a>> wrote:</div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Ahh thank you so very much Andy!<br>
<br>
 <br>
<br>
<br>
<br>
On Sat, 23 Dec 2023 16:59:24 -0600, Andy Lester <<a href="mailto:andy@petdance.com" rel="noreferrer" target="_blank">andy@petdance.com</a>> wrote:<br>
<br>
It’s the current line number. See “perldoc perlvar”<br>
<br>
> On Dec 23, 2023, at 4:57 PM, Richard Reina wrote:<br>
><br>
> <br>
> A few years ago I hastily wrote some code that I did not comment very well. In it I found:<br>
><br>
> $switch = $. if m!^[0-3]?[0-9]/[0-3]?[0-9]/(?:[0-9]{2})?[0-9]{2}$!; # match date<br>
><br>
> Can anyone tell me what $. means?<br>
><br>
> Thanks for any help.<br>
><br>
> Richard<br>
> _______________________________________________<br>
> Chicago-talk mailing list<br>
> <a href="mailto:Chicago-talk@pm.org" rel="noreferrer" target="_blank">Chicago-talk@pm.org</a><br>
> <a href="https://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer noreferrer" target="_blank">https://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
<br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org" rel="noreferrer" target="_blank">Chicago-talk@pm.org</a><br>
<a href="https://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer noreferrer" target="_blank">https://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
 <br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org" rel="noreferrer" target="_blank">Chicago-talk@pm.org</a><br>
<a href="https://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer noreferrer" target="_blank">https://mail.pm.org/mailman/listinfo/chicago-talk</a></blockquote>
</div>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a><br>
<a href="https://mail.pm.org/mailman/listinfo/chicago-talk" rel="noreferrer" target="_blank">https://mail.pm.org/mailman/listinfo/chicago-talk</a></blockquote>
</div>
_______________________________________________<br>
Chicago-talk mailing list<br>
Chicago-talk@pm.org<br>
https://mail.pm.org/mailman/listinfo/chicago-talk</footer>
</div>


</body>