Win has asked for the wisdom of the Perl Monks concerning the following question:
My heavenly ambitions are embedded as comments in the following code. Can anyone suggest a very tidy and short way of fulfilling these ambitions?
foreach (my @tables){ my $table_name = $_; #list of all table names ###### Hash out excluded _tables here ###### # I would like code here that only allows the following 3 variable + assignments to occur when the tables names are not in an array that +lists tables that are excluded from all schemas (this array is not sh +own here). my $Table_1 = "Table_name_A"; my $Table_2 = "Table_name_B"; my $Table_3 = "Table_name_C"; #close list of all table names if (my $table_name = $Table_1){
20031111 Edit by castaway: Changed title from 'One liner'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find array duplicates
by ysth (Canon) on Nov 11, 2003 at 16:19 UTC | |
|
Re: Find array duplicates
by eric256 (Parson) on Nov 11, 2003 at 16:22 UTC | |
|
Re: Find array duplicates
by Art_XIV (Hermit) on Nov 11, 2003 at 16:38 UTC | |
|
Re: Find array duplicates
by Win (Novice) on Nov 11, 2003 at 16:46 UTC | |
by duff (Parson) on Nov 11, 2003 at 18:30 UTC |