Is this even possible ?
Michael G Schwern
schwern at pobox.com
Thu Nov 14 14:05:22 CST 2002
On Thu, Nov 14, 2002 at 10:30:54AM +0000, Tony Bowden wrote:
> my @sql = ("getVendorsSql", "getPricesSql");
> foreach my $sub (@sql) {
> my $queryString = $sub->();
> print "queryString $queryString\n";
> }
>
> or
>
> my $queryString = &$sub;
Just make sure you've got 'no strict "refs"' somewhere before that if you're
using strict. This is what's called a "symbolic reference" and strict no
likey.
The perlref man page has a section on this.
--
Michael G. Schwern <schwern at pobox.com> http://www.pobox.com/~schwern/
Perl Quality Assurance <perl-qa at perl.org> Kwalitee Is Job One
You'll do.
More information about the Belfast-pm
mailing list