sub print_results { my $customer = get_customer($customer_id); ... becomes: sub print_results { my $customer = @_;