redbeard has asked for the wisdom of the Perl Monks concerning the following question:
Which merely opens each file, then iterates to the 2nd line (to get rid of the header), and then chops up the second line of data, I get the errormy @nbdc_filehandles; my @nbdc_data; my $index=0; foreach my $file (@nbdc_files){ open(FILE, "./$nbdc_dir/$file") || die "Can't open ./$nbdc_dir/$fi +le"; $nbdc_filehandles[$index] = *FILE; #get the first set of data values < $nbdc_filehandles[$index] >; < $nbdc_filehandles[$index] >; chomp; #get rid of trailing \n $nbdc_data[$index]=\split(/\t/, $_); $index++; }
I know it's opening the files properly, as there is not death, and a later usage of the filename is fine, it's just accessing the data. Any thoughts?Use of uninitialized value in scalar chomp at ./temp_merge.pl line 46. Use of uninitialized value in split at ./temp_merge.pl line 47.
|
|---|