my $thingy = sub {print "Hola Mundo!\n"};
Is there an advantage one way or the other if I dereference the sub by $thingy->() vs. &$thingy ?
I prefer the former, since that's the way I'm used to dereferencing other things. But just about all examples I see use the '&' prefix instead of the arrow operator.
I'm just wondering if there are times when one way is better than the other.
In reply to Dereferencing code refs with & vs. ->() by doran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |