[Chicago-talk] What does dollar sign followed by a period represent?

Andy Lester andy at petdance.com
Sat Dec 23 14:59:24 PST 2023


It’s the current line number.  See “perldoc perlvar”

> On Dec 23, 2023, at 4:57 PM, Richard Reina <richard at rushlogistics.com> wrote:
> 
> 
> A few years ago I hastily wrote some code that I did not comment very well. In it I found:
> 
>  $switch = $. if m!^[0-3]?[0-9]/[0-3]?[0-9]/(?:[0-9]{2})?[0-9]{2}$!; # match date
> 
> Can anyone tell me what $. means?
> 
> Thanks for any help.
> 
> Richard
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> https://mail.pm.org/mailman/listinfo/chicago-talk



More information about the Chicago-talk mailing list