rheaton has asked for the wisdom of the Perl Monks concerning the following question:
Ok, first some background.
@tfl_list contains a unique list of tables. @tfl_file contains multiple lines of Data to be processed in a 2 Dimensional Array.
I am able to Reference and Print the Data from the 2 Dimensional array outside of the foreach $target_table (@tfl_list) loop.
For each of the "$target_table"'s I need to check a field in the Data Array and if that Field is the same as the $target_table then "Do Something". The problem with the code below is that when trying to de-reference the tfl_line Array nothing is returned. What am I doing wrong? I am sure this is something simple I am forgeting. Thanks
foreach $target_table (@tfl_list) { print "Target Table = $target_table\n"; foreach $tfl_line (@tfl_file) { print " Ref Table = $tfl_line->[9]"; if ($target_table eq $tfl_line->[9]){ #Do Something } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing multiple Arrays and
by alpha (Scribe) on Dec 28, 2006 at 17:56 UTC | |
|
Re: Accessing multiple Arrays and
by gaal (Parson) on Dec 28, 2006 at 17:57 UTC | |
by rheaton (Acolyte) on Dec 28, 2006 at 18:03 UTC | |
by alpha (Scribe) on Dec 28, 2006 at 18:10 UTC | |
by rheaton (Acolyte) on Dec 28, 2006 at 18:52 UTC | |
|
Re: Accessing multiple Arrays and
by geekphilosopher (Friar) on Dec 28, 2006 at 17:57 UTC | |
by rheaton (Acolyte) on Dec 28, 2006 at 18:04 UTC | |
by alpha (Scribe) on Dec 28, 2006 at 18:17 UTC | |
by rheaton (Acolyte) on Dec 28, 2006 at 18:24 UTC |