in reply to Re: Re: Passing filehandle to sub
in thread Passing filehandle to sub
is there a reson or particular situation where it's better to use a bare word?Under the assumption that you're using 5.6+ I can't really think of any practical situations where a bareword filehandle is preferable to a lexical variable. Sure it's potentially less characters, by general practice visually distinctive in code and doesn't incur the overhead of a lexical variable (which, to be honest, is pretty much negligible in all but the most process intensive of operations) but I can't think of any practical situations where these factors outweigh the use of a lexical filehandle. I say practical situations because a bareword filehandle is great for obfuscation and golfing, but in code at large I'd say lexical filehandles would be prefered. If any monks can think of a situation where a bareword filehandle is indeed preferable to a lexical filehandle then please reply below.
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Passing filehandle to sub
by Mr. Muskrat (Canon) on Jun 09, 2003 at 13:34 UTC | |
|
Re: Re: Re: Re: Passing filehandle to sub
by sauoq (Abbot) on Jun 09, 2003 at 21:41 UTC | |
|
Re: Re: Re: Re: Passing filehandle to sub
by bobn (Chaplain) on Jun 09, 2003 at 22:17 UTC |