#!/usr/bin/perl use warnings; use strict; my @dispatch_tables = ( { regex => qr/\w+/, action => sub { print "aaa" }, }, { regex => qr/\d+/, action => &hello_me( @_ ), }, ); $dispatch_tables[0]->{action}; # Wrong! $dispatch_tables[1]->{action}->( "1", "2" ); # Wrong!