#!/usr/bin/perl -w use strict; use English; use vars qw($boo); $a = foo() if 0; sub bar {} END { no strict 'refs'; my $table = '::'; SYMBOL: for my $sym (sort {lc($a) cmp lc($b)} keys %{$table}) { next if $sym =~ /::$/ or $sym =~ /^[A-Z0-9]/; my $name = $table . $sym; next if $name =~ /^::\W/; foreach my $thing qw(ARRAY HASH IO) { if (defined *{$name}{$thing}) { next SYMBOL; } } print "Look at this!\n"; unless (defined *{$name}{CODE}) { warn "Possible undefined routine '$sym'"; } } } #### defined(*foo{SCALAR}) && !defined(*foo{CODE})