Yes - the file will be opened on startup of the program, but the actual writing - if something is written at all - is performed at various other places
That doesn't answer the question since those "various other places" can call a function that has access to the lexical variable without having access to the lexical variable themselves.
Less coupling == good.
In reply to Re^3: Is it possible to "use vars" or "our" a file handle?
by ikegami
in thread Is it possible to "use vars" or "our" a file handle?
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |