Пожалуйста, объясните, почему так называемые функции Perl выше определения функции определяет, выполняются ли они или нет.Почему вы можете вызвать foo() и & foo перед объявлением sub foo, но вы не можете вызвать plain foo?
print "Why does this bare call to foo not run?\n";
foo;
print "When this call to foo() does run?\n";
foo();
print "And this call to &foo also runs?\n";
&foo;
sub foo {
print " print from inside function foo:\n";
}
print "And this bare call to foo below the function definition, does run?\n";
foo;