http://qs321.pair.com?node_id=269974

ozgurp has asked for the wisdom of the Perl Monks concerning the following question:

The following code puts references to sub functions into an array and calls them.
use strict; use warnings; sub a1 { print("a1\n"); } sub a2 { print("a2\n"); } my @procs = (\&a1, \&a2); foreach (@procs) { $_->(); }
If I wanted to print @procs array;
foreach (@procs) { print("$_\n"; } I get: CODE(0x1d4f9ec) CODE(0x1dc40b4)
how can i print the references in the @procs array?