Hacker News new | ask | show | jobs
by dwwatk01 6420 days ago
I ran into a similar problem teaching myself perl a couple years ago by doing a short tutorial then foolishly jumping into a co-worker's code. "What the hell is '$.'? Hmm, well I'm sure Google can help me. What? No matching documents?!? What is this crazy s.o.b. doing here??"
3 comments

Glad to hear I'm not the only one who's had trouble with this. I remember reading some C code once and I saw some strange operators I had never seen before... <? and >?, if I remember correctly.

I eventually figured out they were GCC extensions for "min" and "max", but only after a painful experience trying to get more info out of Google than "here's how you do addition and multiplication in C!"

$. -> "perldoc perlvar" -> $INPUT_LINE_NUMBER -> http://www.google.com/search?q=%24INPUT_LINE_NUMBER+perl