print "PID is $$"; fork(); ... # that is (or can be) essentially the same as: $buffer = ">> PID is $$"; fork(); print $buffer;