Unless, of course, you keep your ordering in some @ordering array. Then, your loop looks something like:
(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.)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"; } ...
------
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.
In reply to Re: Re: checking for null variables
by dragonchild
in thread checking for null variables
by edahm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |