Could anyone please let me know the meaning of $| and where it is being used?
Thanks in advance...
Regards,
J
Could anyone please let me know the meaning of $| and where it is being used?
Thanks in advance...
Regards,
J
You should have read perlvar
documentation (using perldoc perlvar
in most cases) before asking this question.
This is a special variable which controls the output buffering of the currently select
ed output filehandle (which is STDOUT
initially). Setting it to any true value (mostly 1 assigned to it) does buffer flush after any print
, printf
, or write
on that handle. It normally means that you get to see output on that handle immediately, without (block) buffering coming into play.