print "Do you have any images? "; chomp($image_answer = ); if($image_answer eq "yes" || $image_answer eq "y") { print "How many? (1-4) "; chomp($numPics = ); &makeTable($numPics); } elsif($image_answer eq "no" || $image_answer eq "n") {print "No soup for you!\n";} sub makeTable { if($numPics==1){ print NEWCONTENT ""; print NEWCONTENT "
"; print "Name of image 1: "; chomp(=$name1); print NEWCONTENT " \n"; print NEWCONTENT "
"; print "Table for 1 created"; } elsif(numPics==2){ print NEWCONTENT ""; print NEWCONTENT " \n"; print NEWCONTENT "
"; print "Name of image 1: "; chomp(=$name1); print "Name of image 2: "; chomp(=$name2); print NEWCONTENT "
"; print "Table for 2 created"; } elsif(numPics==3){ print NEWCONTENT ""; print NEWCONTENT " \n"; print NEWCONTENT ""; print NEWCONTENT "
"; print "Name of image 1: "; chomp(=$name1); print "Name of image 2: "; chomp(=$name2); print "Name of image 3: "; chomp(=$name3); print NEWCONTENT "
\n"; print NEWCONTENT "
"; print "Table for 3 created"; } elsif(numPics==4){ print NEWCONTENT ""; print NEWCONTENT " \n"; print NEWCONTENT ""; print NEWCONTENT "
"; print "Name of image 1: "; chomp(=$name1); print "Name of image 2: "; chomp(=$name2); print "Name of image 3: "; chomp(=$name3); print "Name of image 4: "; chomp(=$name4); print NEWCONTENT "
\n"; print NEWCONTENT "
"; print "Table for 4 created"; } else print "Number entered is not within accepted paramters. \n"; }