http://qs1969.pair.com?node_id=782859

imrags has asked for the wisdom of the Perl Monks concerning the following question:

Here's something that was lingering in my mind for sometime. I use dynamically named
arrays a lot. I find using them much better when i'm not sure about the quantity of data i have
For example:
$te = HTML::TableExtract->new(keep_headers=> ["Customers","Samples","V +iolations","Availability"]); $te->parse($final_content); $arr_name = "ARR"; my $pages=0; foreach $ts ($te->tables) { print "Table Number(" , join(',',$ts->coords), "):\n"; $rws=0; foreach $row ($ts->rows) { $temp = join (",",@$row); my @row_ele = split(/,/,$temp); print "$pages,$rws\n"; ${$arr_name{$pages}}[$rws]=\@row_ele; # print ${$arr_name{$pages}}[$rws]->[1]."\n"; $rws++; } $pages++; }
Here the $final_content is html data with some tables.
Though this code works absolutely fine and with no errors, i still wonder if I should
use something else other than dynamically named arrays.
I use them in almost anything that deals with threads/html or with data for
which i'm not sure about the quantity...Just curious!
Raghu