I am developing an application where I am importing data from 4 separate flat files.  
A single record spans across all four of the files.  I would like to be able to open 
all 4 files in parallel to make it easier to process them at the same time.

The code I would like to use is:  

        # Open files
        for (my $file_num = 1; $file_num < 5; $file_num++)
        {
           my $in_fn = "Form" . $file_num . "Export.CSV";
           print "$in_fn\t";
           open IN_FILE[$file_num], "<" . $in_fn || die "unable to open $in_fn: $!\n";
        } ## end of for (my $file_num = 1; $file_num < 5; $file_num++)


However, I get the following syntax error: 
        Missing comma after first argument to open function at qt.pl line 29, near 
""unable to open $in_fn: $!\n";"

Is there a workaround?

----------------------------------------------------------------------------------------
James H. Cutts III            Integrated Technology Services
Computer Project Manager      Research and Education Support
Phone: (573) 882-6181         University of Missouri - Columbia
FAX:   [573] 884=8192         DC017.00,  265H Quarterdeck
                              Columbia, MO  65212

E-Mail: [EMAIL PROTECTED]


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

Reply via email to