#!/usr/bin/perl @skuid=("11021","11022","11023","92523002", "02196005","92196019","92176184","92305069", "92305070","92305054","14316002","92620206", "92503001"); @name=("mt. eden","dom perignon","veuve cliquot", "Arcadian Pinot Noir Sl Holl","Au Bon Climat Pinot Noir La Bauge", "Au Bon Climat Pinot Noir Laetitia", "Bannister Pinot Noir Seghesio Vineyard", "Broadley Pinot Noir Claudias Choice", "Broadley Pinot Noir Marcille Loraine", "Broadley Pinot Noir Reserve","Castalia Pinot Noir Rochioli Vyd", "Coldstream Hills Pinot Noir","Costa De Oro Pinot Noir"); @price=("45.99","135.99","79.99","24.99","24.99", "39.99","26.99","39.99","29.99","23.99", "29.99","17.99","19.99"); @combo=($skuid,$name,$price); print "Content-type:text/html\n\n"; $n==0; foreach $item(@combo) { print "SKUID:$skuid[$n]\n"; print "NAME:$name[$n]\n"; print "PRICE:$price[$n]\n"; $n++; } #### #!/usr/bin/perl use strict; # Always. use CGI ':standard'; my %winelist = ( "11021" => ["mt. eden", "45.99"], "11022" => ["dom perignon", "135.99"], "11023" => ["veuve cliquot", "79.99"], "92523002" => ["Arcadian Pinot Noir Sl Holl", "24.99"], "02196005" => ["Au Bon Climat Pinot Noir La Bauge", "24.99"], "92196019" => ["Au Bon Climat Pinot Noir Laetitia", "39.99"], "92176184" => ["Bannister Pinot Noir Seghesio Vineyard", "26.99"], "92305069" => ["Broadley Pinot Noir Claudias Choice", "39.99"], "92305070" => ["Broadley Pinot Noir Marcille Loraine", "29.99"], "92305054" => ["Broadley Pinot Noir Reserve", "23.99"], "14316002" => ["Castalia Pinot Noir Rochioli Vyd", "29.99"], "92620206" => ["Coldstream Hills Pinot Noir", "17.99"], "92503001" => ["Costa De Oro Pinot Noir", "19.99"], ); print header(), start_html(); print "\n\n\n\n"; print h1( "My Wine Collection" ), "\n\n"; print table( {-width, '100%'}, TR( td( {-width, '20%'}, "SKUID" ), td( {-width, '60%'}, "WINE" ), td( {-width, '20%'}, "PRICE" ) )), "\n"; my $wine; foreach $wine (keys %winelist) { print table( {-width, '100%'}, TR( td( {-width, '20%' }, "$wine" ),"\n", td( {-width, '60%' }, "$winelist{$wine}[0]" ), td( {-width, '20%' }, "$winelist{$wine}[1]" ) )), "\n"; } print end_html();