bobbybobbertson
Programmer
I found this line in some code and don't understand it.
Is it calling a function using variables?
$actions{$page}->();
Is it calling a function using variables?
$actions{$page}->();
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
my %actions = ( page1 => \&go_page1,
page2 => \&go_page2,
);
$subref = \&mysub;
# Or
$subref = sub { ... (sub def here) .. };
# Then call as
$subref->();