do_work ($cmd); sub do_work { my $command = shift; # do stuff here... }