in reply to Re: checking for null variables
in thread checking for null variables

The downside to the last idea, of course, is that you lose control over the ordering.

Unless, of course, you keep your ordering in some @ordering array. Then, your loop looks something like:

my %longform ... $longform{name} = 'Full Name'; $longform{pubname} = 'Publication Name'; ... my @ordering = qw( name pubname ... ); foreach my $form (@ordering) { print MESSAGE "$form: $longform{$form}\n"; } ...
(Style nit - don't use double-quotes unless you need them. Single-quotes tell me, the maintainer, that this is a constant string. Double-quotes tell me it could change.)

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.