my $goal = "what is to be accomplished?"; my @tasks = qw( all the necessary steps to get there ); do work(@tasks) if ( want_to_accomplish($goal) );