princepawn has asked for the wisdom of the Perl Monks concerning the following question:
my %required_column = ( organization => [qw(0 1 2 4 6 7 8 12 15 16 17 18)], contact => [qw(0 1 2 3)], service => [qw(0 1 2 3 4 5 6 7 10 11 )], faq => [qw(0 1 2 3 5 )], literature => [qw(0 1 2 11 12 13)] ); sub sanity_check { my ($file, $column, $col_count) = @_; my $file = basename $file; $dcr_type = Gendcr::determine_dcr_type($file); if (not length($column)) { return if grep { $col_count eq $_ } @{$required_column{$dcr_type}} +; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [perlfunc] does "if" force "grep" into a scalar context?
by broquaint (Abbot) on Oct 24, 2002 at 15:36 UTC | |
|
Re: [perlfunc] does "if" force "grep" into a scalar context?
by Zaxo (Archbishop) on Oct 24, 2002 at 15:46 UTC | |
|
Re: [perlfunc] does "if" force "grep" into a scalar context?
by PodMaster (Abbot) on Oct 25, 2002 at 02:50 UTC |