good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Problem with creating Filesby David92 (Sexton) |
on Jul 25, 2014 at 09:31 UTC ( [id://1095012]=perlquestion: print w/replies, xml ) | Need Help?? |
David92 has asked for the wisdom of the Perl Monks concerning the following question:
Hey Monks,
This is a very big program, so it might be, that I wont get an answer here, due to not understanding what do I seek help for, I'll try my best to explain. --------------------------------------------------------I have a problem when I create HTML pages with PERL. I use 2 Arrays. In FirstArray there are more elements than in SecondArray. When I start to create HTML's, I use in one of the Navigation Menus the list of elements in FirstArray. When you chose one element in the menu, it will open a new HTML (firstArray1.html) that wil display some statistics in a chart. That HTML has two buttons below the chart: FirstArray and SecondArray (name of buttons). If you click on SecondArray it will switch from current HTML (firstArray1.html) to (secondArray1.html). And then again if you click on FirstArray button it will switch to (firstArray1.html). The problem is that the FirstArray has more elements than SecondArray. And those elements that are NOT in the SecondArray are causing problems: Lets say we are in firstArray5.html and by clicking SecondArray button the page will try to load secondArrray5.html - HOWEVER there is NONE, because secondArray does not have that element as firstArray has.I have to keep the code as it is (all other 1000 lines of code). I have a seperate sub where I create the buttons:
Filename is for e.g. firstArray1.html. I use a foreach loop in other subs to go over all elements in firstArray and another to go through all elements of secondArray. In real example filename is: file1LAY.html and file1DFT.html ... that is why I use the index, because I need a button to work for every HTML (filename). I want to make it so, that if file does not exist (but the reference is stored in one of the Buttons) it should change the reference to '#' This is a hard challenge, but I am in despair, so atleast I can try to ask, someone might have an idea. BR
Back to
Seekers of Perl Wisdom
|
|