#!/usr/bin/perl -w use strict; my %dispatch = ( 'immunizations' => \&immunizations, 'allergies' => \&allergies); sub immunizations { print "inside immunizations\n"; } sub allergies { } $dispatch{'immunizations'}->(); #prints: inside immunizations
In reply to Re: How to call a Sub / Function with changing name
by Marshall
in thread How to call a Sub / Function with changing name
by kevyt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |