Keep It Simple, Stupid | |
PerlMonks |
not a list?by december (Pilgrim) |
on Jul 26, 2002 at 01:59 UTC ( [id://185402]=perlquestion: print w/replies, xml ) | Need Help?? |
december has asked for the wisdom of the Perl Monks concerning the following question: Ave fellow monks, From the frightening depths of ignorance I come for thee again, to ask for thy infinite wisdom. I have the following construction (extract):
It opens a directory, searches for a certain file in the list, and returns the index of that file (so I can link to previous and next picture in a gallery). The problem is that index is always '1', and the second print-out says 'SininenLaguuni.jpg equals KeltaisenKesanBooli.jpg', which is clearly not the case. If I do the index-searching like this:
... it seems to work: '9 - KeltaisenKesanBooli.jpg equals KeltaisenKesanBooli.jpg'. What I don't understand is why the first solution doesn't and the second one does work. These are all list operations on lists, as far as I see. Enlighten me, please... I'm sure it's something very stupid I'm too tired to see. thanks, wouter
Back to
Seekers of Perl Wisdom
|
|