http://qs321.pair.com?node_id=1040718

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

Hi All, Currently I facing a problem to add a filtering function similar as MIcrosoft excel in to my Perl script table. Previouly I wrongly post the forum need the sort for table, actually what I really need is filtering function. Anyone know is the Perl have a client filtering function? Below is the simple table I success to create my table:
open(INFO, "data.txt"); # Open db for reading @array=<INFO>; close (INFO); @ascend=sort(@array); print $status_table->header('text/html'); # create the HTTP header print $status_table->start_html('Status Table'); # start the HTML print $status_table->h1({-border=>'0', -align=>'center'},'Welcome to +Engineering Equipment List'); print $status_table->start_table({-border=>'5',-align=>'center'}); print $status_table->start_Tr({-align=>'center', -style=>'background-c +olor: #00BFFF'}); print $status_table->start_td; print 'No'; print $status_table->start_td; print 'Equipment ID'; print $status_table->start_td; print 'Description'; print $status_table->start_td; print 'Serial Number'; print $status_table->start_td; print 'Asset Tag'; print $status_table->start_td; print 'MIDA'; print $status_table->start_td; print 'Old MIDA Ref'; print $status_table->start_td; print 'Group'; print $status_table->start_td; print 'Owner'; print $status_table->start_td; print 'Location'; print $status_table->start_td; print 'Location Comment'; print $status_table->start_td; print 'Comment'; print $status_table->start_td; print 'Cost Center'; print $status_table->start_td; print 'Tagging Date'; print $status_table->end_td; print $status_table->end_Tr; foreach my $line (@ascend) { my($Equipment_ID,$Description,$Serial_Number,$Asset_Tag,$MIDA,$Old +_MIDA_Ref,$Group,$Owner,$Location,$Location_Comment,$Comment,$Cost_Ce +nter,$Tagging_Date)=split(/\|/,$line); print $status_table->start_form(-name=>'Detail', -target=>'_top', +-method=>'post', -action=>'detail.pl'); print $status_table->start_Tr; print $status_table->start_td({-align=>'center'}); print $i++; print $status_table->start_td({-align=>'center'}); print "$Equipment_ID"; print $status_table->start_td; print "$Description"; print $status_table->start_td({-align=>'center'}); print "$Serial_Number"; print $status_table->start_td({-align=>'center'}); print "$Asset_Tag"; print $status_table->start_td({-align=>'center'}); print "$MIDA"; print $status_table->start_td({-align=>'center'}); print "$Old_MIDA_Ref"; print $status_table->start_td({-align=>'center'}); print "$Group"; print $status_table->start_td({-align=>'center'}); print "$Owner"; print $status_table->start_td; print "$Location"; print $status_table->start_td; print "$Location_Comment"; print $status_table->start_td; print "$Comment"; print $status_table->start_td({-align=>'center'}); print "$Cost_Center"; print $status_table->start_td({-align=>'center'}); print "$Tagging_Date"; print $status_table->end_td; print $status_table->end_Tr; print $status_table->end_form; } print $status_table->end_table; #end the table print $status_table->end_html; # end the HTML
Thanks :)