On Sat, 9 Jul 2022 06:14:36 +0900 Yuki Kimoto <kimoto.yuki@gmail.com> wrote: > I'm interested in this topic. > > I have questions. > > 1. Can this be resolved in tokenizer? > > This means ${^INPUT_LINE_NUMBER} is replaced with $. in toke.c. No. That's really the variable's name, as can be demonstrated via softrefs: $ perl -E '"hello" =~ m/\w+/p; say ${^MATCH}; my $varname = "\cMATCH"; say $$varname' hello hello > 2. Is the brace required? > > Is $^INPUT_LINE_NUMBER allowed? Yes. $^ is already a variable on its own (a little-known part related to formats). > 3. Can only the aliases that are often used be added? > > For example, in my experience. I use $., $/, $$, $@, $!, $<, $> etc. > > If 1 and 3 are ok, I can write RFC. I'm not sure what significance part 1 has on writing the RFC. That feels like a purely implementation-level question. -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/Thread Previous | Thread Next