so then the sub would be called multiple times and the ^={30}, is just tellin it to stop for now right? btw, simple print debugging can be very revealing. checking the value interactively as you go through the code. something like
print $var_to_check;
my $dummy = <STDIN>; #so it doesn' fly by in programs that generate lo
+ts of output