On Sep 20, Geert Neuts said:
>for ($i = 0; $i < @stuff; $i++) {
> print "$stuff[$i][0] ($stuff[$i][1])\r\n";
>}
$stuff[$i][1] is just a reference to the function. To actually call it,
you'll need to use
&{ $stuff[$i][1] }
or
$stuff[$i][1]->();
However, neither of those expands in a double-quoted string, so you'll
have to write something like:
print "$stuff[$i][0] (", $stuff[$i][1]->(), ")\r\n";
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]