"Roman Daszczyszak" schreef: > After reading Randal's March 2000 LM column and learning that you can > assign a filehandle to a scalar by doing something like: > > open(FILE, $filename) or die "whatever"; > $value = *FILE{IO}; > > I am wondering if there are other, perhaps better, ways of doing this? > > FYI, I googled for "assigning filehandle to variable perl" and a > couple other searches, but only came up with pages directing how to > read from a filehandle into a scalar.
Use lexical ones in the first place. open my $fh, '<', $filename or die "open $filename, stopped" ; -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>