print defined(&foo); sub foo{ print "foo exists!"; }; # 1 # This is perl, v5.8.8 built for i686-linux