Martin Moss wrote:
> how can I tell that the reference I've been given is
> actually a reference to a subroutine?

    print "subref" if ref($callback) && ref($callback) eq 'CODE';

perldoc -f ref

ref returns undef if the variable is not a reference, and 'CODE' for a
subref.

Cheers,
Philip
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to