← Daily
📝 article avdi.codes · August 25, 2026

Output Field Separator in Ruby

Avdi Grimm on what $, actually is in Ruby: the output field separator, inherited from AWK and Perl, not a global variable for nil as is sometimes assumed.

Chris Oliver asked on LinkedIn: I left a comment there, but I wanted to preserve it here as well: There is no “global variable for nil”. $, is the “output field separator”. Known as OFS in AWK, it is known shorthand-mnemonically as $, in both Perl and Ruby – the mnemonic being that “comma” is […]

Read on avdi.codes →

More from this day

+ Feature your site