OUTER-IF: if ( $type eq 'apple' ) { for my $item ( @items ) { apple_wash($item); apple_core($item); apple_pulp($item); } } elsif ( $type eq 'banana') { for my $item ( @items ) { banana_bend($item); banana_hang($item); } } else { die "bad fruit: $type"; } INNER-IF: for my $item ( @items ) { if ( $type eq 'apple' ) { apple_wash($item); apple_core($item); apple_pulp($item); } elsif ( $type eq 'banana') { banana_bend($item); banana_hang($item); } else { die "bad fruit: $type"; } } ARRAY OF SUB-REF: my @funcs; if ( $type eq 'apple' ) { push @funcs, \&apple_wash, \&apple_core, \&apple_pulp; } elsif ($type eq 'bananas') { push @funcs, \&banana_bend, \&banana_hang; } else { die "bad fruit: $type"; } for my $item ( @items ) { for my $func (@funcs) { $func->($item); } } SYMBOL-TABLE FIDDLE: if ( $type eq 'apple' ) { *func1 = \&apple_wash; *func2 = \&apple_core; *func3 = \&apple_pulp; } elsif ($type eq 'bananas') { *func1 = \&banana_bend; *func2 = \&banana_hang; *func3 = \&noop; } else { die "bad fruit: $type"; } for my $item ( @items ) { func1($item) unless \&func1 == \&noop; func2($item) unless \&func2 == \&noop; func3($item) unless \&func3 == \&noop; }