eval(<<<'PERL' sub add_two { my $n = shift; return $n + 2; } PERL ); echo "add_two(3) is ... ", $perl->add_two(3), "\n";