$sym = gensym; open($sym, "filename");
If you see code like that, I think it was for old versions of perl (I belive pre-5.6) where filehandles couldn't be autovivified, so you had to create a glob with gensym or open would complain.
In reply to Re: using lexically scoped variable as a filehandle
by ambrus
in thread using lexically scoped variable as a filehandle
by varian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |