my $test = eval "sub { print 'hello world' }"; $test->(); # prints the ever-classic "hello world"