|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
How does $. work in one liner?by elevenfly (Novice) |
| on May 28, 2016 at 22:20 UTC ( [id://1164417]=perlquestion: print w/replies, xml ) | Need Help?? |
|
elevenfly has asked for the wisdom of the Perl Monks concerning the following question: Hello! I found a code like this: perl -n -e 'print $_ if 1..2' test.txtThis code will only print the first and second in test.txt and I was told that if will compare $. with the line number I provide. But what is the reason for that? Can anyone provide any help? Thanks!,
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||||