-command => &numpress($i)) #### -command => sub { numpress( $i ) } # or -command => [ \&numpress, $i ]