http://www.perlmonks.org?node_id=918141

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Here's a snippet of my code.
#!/usr/bin/perl use strict; use Getopt::Long; GetOptions( 'a=s' => \my $opt_a, 'b=s' => \my $opt_b, ... 'z=s' => \my $opt_z, );
I have about 26 options and I would want all of the options checked if the user has entered something in the option. I am hoping to do this in a for-loop statement so that it would look cleaner. Something like this.
for my $i (<loop through all the options>) { die if ( ! $i ); }
Any suggestions?