
Louis Mc
Deleted
Apr 14, 2000, 2:53 PM
Post #1 of 2
(273 views)
|
|
Creating HTML(tables) without CGI.pm
|
Can't Post
|
|
I am not able to use CGI.pm. I'm trying to put this together without it. Is there a way to comibine these two processes - The grabbing of the lines and creating a table for each set? This is the data, it arrives as @input : ACCRT222 2381RH BFGRT222 250OWLH ACCRC222 2383LH3 BFGRT222 250OWRH I only grab the lines with "ACCRC" at the beginning and break up the data into useable pieces. --------------- my $sWant = "ACCRC"; my $sInput; foreach $sInput ( sort grep { $sWant eq substr( $_, 0, 5 ) } @input ) { $passData{"vend_id"} = substr($sInput, 0, 3); $passData{"response_cd"} = substr($sInput, 3, 2); $passData{"mdl_id"} = substr($sInput, 5, 3); } #Then generate enough tables in @tablehtml to hold the data $NumberLines = grep(/ACCRC/i, @input); my (@tablehtml); $i = 0; while ($i < $NumberLines){ push (@tablehtml, "<CENTER>", "<TABLE WIDTH=600>", "<TR>", "<TD>", "$passData{"vend_id$i"}", "<HR>", "", "$passData{"response_cd$i"}", "<HR>", "", "$passData{"mdl_id$i"}", "<HR>", "", "You should use your browser's bookmarks to go to your next page.", "</TD>", "</TR>", "</TABLE>"); } continue { $i++; }
|