in reply to How can I create a procedure

Not quite sure what you're trying to do, but one nice way to delay execution is to use an anonymous sub:
my @procs; my @actions = ([qr/test 1/, sub { thing if true; }], [qr/test 2/, sub { thing if true; }]); for my $x (@actions) { my ($re, $sub) = @$x; if (/$re/) { push @procs, $sub; } } while (<INPUT>) { for my $f (@procs) { $f->($_); } }
/s