#!/usr/bin/perl use strict; use warnings; bar(); sub bar { if ( foo() ) { goto &bar; } return; } my $i = 0; sub foo { return $i++ < 1_000_000_000; }