zbest has asked for the wisdom of the Perl Monks concerning the following question:
I have a script with the following two lines:
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 ..."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: filehandle for close
by eyepopslikeamosquito (Archbishop) on Jan 14, 2013 at 21:05 UTC | |
Re: filehandle for close
by zbest (Initiate) on Jan 14, 2013 at 21:04 UTC | |
by eyepopslikeamosquito (Archbishop) on Jan 14, 2013 at 21:56 UTC | |
by Anonymous Monk on Jan 14, 2013 at 21:48 UTC | |
Re: filehandle for close
by blue_cowdawg (Monsignor) on Jan 14, 2013 at 20:45 UTC | |
Re: filehandle for close
by razzmataz (Novice) on Jan 15, 2013 at 14:45 UTC |
Back to
Seekers of Perl Wisdom