jls13 has asked for the wisdom of the Perl Monks concerning the following question:
my problem arises in that map statement. i want $_ to get from 1 to the count of the anonomys array (so basically $results[$row][1..the count here])...will this work, or can you give me something that will . thanksforeach $table(keys %tableNum){ my $sth = $dbh->prepare($sqlbyTabs{"$table"}) || die("Unable +to perpare statement"); $sth->execute() || die("Database execute Error: $DBI::errstr") +; @results = @{ $sth->fetchall_arrayref }; for ($row = 0; $row <= $#results; $row++) { $h = @{$results[$row]}[0]; map{$Data{$h}{$tableFts{$table}[$_]} = @{$results[$row]}[$_ +]}1..$#results->[$row]; <br> } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mapping 2nd array
by Zaxo (Archbishop) on Feb 13, 2005 at 20:42 UTC | |
by jls13 (Initiate) on Feb 13, 2005 at 21:13 UTC | |
|
Re: mapping 2nd array
by Errto (Vicar) on Feb 13, 2005 at 21:55 UTC |