exists
sub send_values { my ($args) = @_; my @params = qw( name address pic id zip phone ); my $values = "Your Results are:\n"; for (@params) { $values .= "$args->{$_}\n" if exists $args->{$_}; } }

In reply to Re: Subroutine question on use of uninitialized value. by toolic
in thread Subroutine question on use of uninitialized value. by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":