in reply to Re: can you autoflush a program in unix?
in thread can you autoflush a program in unix?

You could make the $FLUSH variable pull it's value from an environment variable like so:
$FLUSH = $ENV{FLUSH} || 1;
The 1 is a default, which you can change to 0. That lets the user call your script from the shell as:
bash# AUTOFLUSH=1 /path/to/script.pl

Replies are listed 'Best First'.
Re^3: can you autoflush a program in unix?
by ikegami (Patriarch) on Oct 20, 2009 at 20:20 UTC

    Aside from the discrepancy in your variable names, you seem to have missed this paragraph of the OP

    Now say for example that FLUSH is NOT set and I am unable to set FLUSH (for example if I don't have permission to modify to the program).