in reply to Re^2: Viterbi application
in thread Viterbi application

No problem, this can happen, but please make sure, before opening a new thread, that at least the part of your code that produces the input data is really correct. This way, we can try to work on your Viterbi algorithm itself with good data. For the time being, the Dumper output shows for example some inner arrays with only 0 values, I am not completely sure that's really what you want to start with. Don't hesitate to use the Dumper function of the Data::Dumper module (the way I did it) to better visualize your data and be sure that it is what you wish us to work on. Also note that the two zero-cost code segments were bugged and could not compile; I fixed them so that they would at least compile and do something, but I am not completely sure that what they do now is really what you wanted them to do. Well, in brief, please provide really good input data, then, once we have that, I am sure that some gentle monks among us will be willing to go through the Viterbi algorithm with you. (If you have trouble producing really good input data, I would suggest that you ask for help here, and create a new thread only once this part of the work is completely solved.)