my ($operation, @operands) = @ARGV or die usage(); if ($operation eq 'add') { my $sum = add(@operands); ...