$pics_found = $#pics + 1;
looks a bit odd. I don't see a @pics array anywhere (perhaps it got lost when cutting your code down for the post) but I assume that is where you hope to store the pictures you've found. You would probably do better to initialise $pics_found before your loop then increment it ($pics_found ++;) every time you find a picture and put it in the @pics array (assuming that's what you are doing).
Cheers,
JohnGG
In reply to Re: while loop not stopping
by johngg
in thread while loop not stopping
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |