Use a hash instead of five scalars. Then you can do:
my @found; foreach my $field_name (qw/name vorname plz tel tel49/) { push(@found, $field_name) if ($my_hash{$field_name}); }
(Untested)
That will give you an array of all the fields that are set. This may or may not be helpful - you didn't say what you planned to do with the results.
In reply to Re: A Case with 5 Var's
by dorward
in thread A Case with 5 Var's
by ultibuzz
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |