A Perl variable which sets the output field separator for the print function. Also known as $OFS or $OUTPUT_FIELD_SEPARATOR (if one is using the English module). Related to awk's OFS variable, and works the same way. It is printed in between arguments in print statements. Local to the currently selected filehandle. By default, $, is set to the empty string.

Example of its use:

print "Hello", " world!\n"; # prints "Hello world!"
$, = ',';                   # set $,
print "Hello", " world!\n"; # prints "Hello, world!"
                            # (note the comma)

Log in or register to write something here or to contact authors.