use strict; use warnings; our $limit =1050; our $l=0; sub tst { $l++; #warn "level: $l" unless $l%50; die "LIMIT $limit reached" if $l>$limit; tst(); } tst();