#!/usr/bin/perl -w use strict; use vars qw($refresh_list %refresh_list @refresh_list); %refresh_list = @refresh_list = 1..10; $refresh_list = 'Im a scalar'; sub refresh_list { return "Im a subroutine" }; my %command_list = ( 'update' => { args => 2, function => *refresh_list, }, ); print "Sub: " . &{ $command_list{update}{'function'} } . "\n"; print "Scalar: " . ${ $command_list{update}{'function'} } . "\n"; print "Hash: " . %{ $command_list{update}{'function'} } . "\n"; print "Array: " . @{ $command_list{update}{'function'} } . "\n"; __END__ Sub: Im a subroutine Scalar: Im a scalar Hash: 4/8 Array: 10