> So, joyfully, I wrote the following: use FileHandle; foreach my $key (0 .. 34) { $fh = new FileHandle "> VTOL$key"; $flist{$key} = $fh; print $flist{$key} "Header info\n"; }
> But it will not compile, it errors with: C:\>VTOLparser.pl String found where operator expected at C:\VTOLparser.pl line 9, near " } "Header info\n"" (Missing operator before "Header info\n"?) I saw this somewhere else, there's something about the list context of print that keeps it from treating the stored filehandle properly. I recall from Perl Best Practices the suggestion to use curlies to make clear that the first entry is a filehandle and not something else.: use FileHandle; my %flist; foreach my $key (0 .. 34) { my $fh = new FileHandle "> VTOL$key"; $flist{$key} = $fh; print { $flist{$key} } "Header info\n"; } anyway that works. a ------------------- Andy Bach Systems Mangler Internet: [EMAIL PROTECTED] Voice: (608) 261-5738 Fax: 264-5932 "When angry, count to four; when very angry, swear." Mark Twain _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs