#!/usr/bin/perl use strict; use warnings; if(defined &test){ print "yes\n"; } else{ print "no\n"; } sub test{ print "Hallo\n"; }