sub foo { die 'call to foo' } print 'foo is ', defined &foo ? 'defined' : 'not defined', "\n"; print 'bar is ', defined &bar ? 'defined' : 'not defined', "\n"; __END__ foo is defined bar is not defined