PY> I know $NR is the same as $INPUT_LINE_NUMBER. But I'm wondering what N
PY> and R in NR stand for.
PY> I think R might stand for numbeR? Does N stand for iNput or liNe?
Number of Records. it was inherited from awk which has the same variable
NR (from the awk man page):
NR The total number of input records seen so far.
and that also works as the line number so they are the same thing with
different names for historical reasons.
it helps when learning perl to know its major influences which are c,
shell and awk. c is still used as is shell. awk is pretty much a side
player if at all today but when i first learned perl, awk was in heavy
use. in any case many awkish things are in perl such as some names, the
range operator (scalar mode), hashes, the -p option loop, etc.
uri