in reply to Bad While Loop

two, check that the sub that you call before to define it is really available and that my $vars are the same inside and outside loops