since both print and close take a FILEHANDLE, I would expect these to work. However the print works fine and writes to the desired file handle, but the close fails with:open $files{ "foo" }, " > xyz"; print { $files{ "foo" } } "done\n"; close { $files{ "foo" } };
I do not know what a GLOB is. Is there a simple way to close this file that works?"Not a GLOB reference at ..."
In reply to filehandle for close by zbest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |