theguvnor has asked for the wisdom of the Perl Monks concerning the following question:
Occasionally I see in scripts other people write, the idiom
local (*FILE)where FILE is the filehandle being initialized. The question is, why do this? I always just create my filehandles when I need them, by assigning them names in my open(FILE,"$file") statements. Is there a really good reason to initialize them ahead of time with local?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Local(*FILE);
by CheeseLord (Deacon) on Jan 13, 2002 at 01:35 UTC | |
|
Re: Local(*FILE);
by dws (Chancellor) on Jan 13, 2002 at 01:49 UTC | |
|
Re: Local(*FILE);
by clintp (Curate) on Jan 13, 2002 at 02:05 UTC | |
|
Re: Local(*FILE);
by IlyaM (Parson) on Jan 13, 2002 at 06:54 UTC | |
by tilly (Archbishop) on Jan 13, 2002 at 08:17 UTC | |
by Anonymous Monk on Jan 13, 2002 at 22:03 UTC |