use strict; use warnings; # We're defining the "Foo" package inline here, but # imagine it's actually defined in a different file and # loaded with `use Foo`; { package Foo; sub foo { my $val = shift; # what on earth is this following line doing? next if $val < 3; } } # imagine that there are hundreds of other lines here for my $i (0..10) { Foo::foo($i); # why don't 0, 1 and 2 get printed?? print $i, "\n"; }