#!/usr/bin/perl -l use strictures 1; use Devel::SimpleTrace; sub Foo { use strict 'refs'; use warnings; my $x = shift(); return sub { my $y = shift(); print "$x, $y!"; } } use strict 'refs'; my $h = Foo("Hello"); my $g = Foo("Goodbye"); print &$h("Bar"); print &$g("Baz");
In reply to Re: Sub ref from string without eval
by Khen1950fx
in thread Sub ref from string without eval
by lackita
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |