I have a basic project in which I need to break a larger file down into
35 separate files.  I was under the impression that use FileHandle would
store the object in $fh.  I could then create a a copy of my file, save
the associated object in a hash array and print some header information
for the files all in a simple loop.  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"?)
syntax error at C:\VTOLparser.pl line 9, near "} "Header info\n""


I've tried using OO syntax on $flist{$key}->print and get the same
error.  I am sure this is something so vastly simple, I am missing it.
Any help?


TIA,


- Adam
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to