I tried the following code
sub TestArray { my @file_array; my $InputFile = "/home/test/test_file.dat"; # '|' separator file my $column; my $row; tie @file_array, 'Tie::File', $InputFile or die $!; shift @file_array; foreach $row (0..@file_array-1) { foreach $column (0..@{$file_array[$row]}-1) { $LOG->info( "Element [$row][$column] = $file_array[$row][$ +column]\n"); } } }
At this point I'm trying to load the file into a multidimentional array. The file has 10 columns and 50,000 rows. How can I extract data from this array. When I run this, I'm getting the following error: Can't use string ("DEAL_NAME|TRANCHE_NAME|GROUP_NO|") as an ARRAY ref while "strict refs" in use at ./test_feeds.pl
In reply to Re^2: load a file in memory and extract parts
by healingtao
in thread load a file in memory and extract parts
by healingtao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |