in reply to Re: call external sub ref from method in single line
in thread call external sub ref from method in single line
It's even possible to reduce the statement by two whole characters! — although I would argue that the code is de-clarified by doing so:
c:\@Work\Perl\monks>perl -wMstrict -le "sub mysub { print 'hiya'; } my $hr = { sub_ref => \&mysub }; $hr->{sub_ref}(); " hiya
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: call external sub ref from method in single line
by Athanasius (Archbishop) on Oct 05, 2015 at 13:44 UTC | |
by AnomalousMonk (Archbishop) on Oct 05, 2015 at 14:10 UTC | |
|
Re^3: call external sub ref from method in single line (some golf)
by mr_ron (Deacon) on Oct 05, 2015 at 15:57 UTC |