<?xml version="1.0" encoding="windows-1252"?>
<node id="181168" title="Re: Random Tips on Parse::RecDescent" created="2002-07-11 19:01:38" updated="2005-07-07 14:58:21">
<type id="11">
note</type>
<author id="114691">
Aristotle</author>
<data>
<field name="doctext">
Useful compilation, but you can go back and reenable &lt;tt&gt;strict 'refs'&lt;/tt&gt;.

&lt;code&gt;#!/usr/bin/perl -w
use strict;

for (qw(foo bar)) {
        ($main::{$_} or sub { print "No such sub: $_\n" })-&gt;();
}

sub foo {
        print "Yes, I'm here.\n";
}
__END__
Yes, I'm here.
No such sub: bar
&lt;/code&gt;

Alternatively:

&lt;code&gt;(UNIVERSAL::can('main', $sub) or sub { print "No such sub: $_\n" })-&gt;();
&lt;/code&gt;

&lt;tt&gt;____________&lt;/tt&gt;&lt;br&gt;&lt;i&gt;Makeshifts last the longest.&lt;/i&gt;</field>
<field name="root_node">
180778</field>
<field name="parent_node">
180778</field>
</data>
</node>
