{ # localize $foo my $foo = 0; use constant FOO_CYCLE => 23; sub note_a_foo { $foo++; } sub check_foo { return unless $foo >= FOO_CYCLE; $foo = 0; do_something_about_foo; } } #### for (long_loop) { ... note_foo; ... } #### -- Jeff Boes vox 269.226.9550 ext 24 Database Engineer fax 269.349.9076 Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt...Connecting People With Expertise